Using VBscript to set a control to be required or not required - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

Using VBscript to set a control to be required or not required

Last post 05-05-2010 08:05 AM by Qazi Anis. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 05-05-2010 06:58 AM

    Using VBscript to set a control to be required or not required

    How do I make controls required only if a radio button a control is a certain value?  I know I can do this based on the OnAfterChange, just not sure what the code would be.

     

    Just to rephrase -

     Is there a programatic way (Vbscript) to set the attribute (Can Not Be Blank) for a control?

    example:

    if (XDocument.DOM.selectSingleNode("//my:err_user_catagory").text = "False") then XDocument.DOM.selectSingleNode("//my:NumberUsers")..... (set this field to Can Not Be Blank)

    Filed under: , ,
  • 05-05-2010 08:05 AM In reply to

    Re: Using VBscript to set a control to be required or not required

    use data validations for that

    suppose u have two fields

    field1

    field2

    field2 is required only if field one has "yes" value.

    on field2 rightclick and click data validation -> Add

    field1 is equal to Yes  and

    field2 is blank

    then enter the tip .. and click ok

    now this field will be required if field1 = Yes

     

    Qazi Anis
    Technical Architect
    Bitwise Inc
Page 1 of 1 (2 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.