BTD 0 Newbie Poster

I am still struggling with validating events for InfoPath forms.
The Conditional Formatiing isn’t enough.

Here is what I have tried but it doesn’t work.

Basically, when a user clicks the reject radio button, I want to enable the Submit button.
And on the same form, when an Approver clicks the approve radio button, the Submit button will only be enabled when the Approvers select someone from the Repeating table of users.

Its this complexity that prevents me from using Conditional Formatting.

Any ideas?

Tom

I added an event for the “reject Radio button” as follows:
EventManager.XmlEvents["/my:myFields/my:optApprove"].Changed += new XmlChangedEventHandler(optApprove_Changed);
But the Submit button does not enable/disable when I click the reject radio button.

Here is the code and I did not see an Enable Disable property in the intellisense so I thought “Enabled” would work.
Also, when I set a break point, it only fired when I clicked the cancel button.

    public void optApprove_Changed(object sender, XmlEventArgs e)
    {
        // Write your code here to change the main data source.
        XPathNavigator xnMyForm = this.CreateNavigator();
        XmlNamespaceManager ns = this.NamespaceManager;            
        XPathNavigator btnSubmit = this.MainDataSource.CreateNavigator();
        btnSubmit = xnMyForm.SelectSingleNode("/my:btnAccept", ns);
        btnSubmit.SetValue("Enabled");

    }