Expand my Community achievements bar.

Form validation based on selected options

Avatar

Former Community Member

Hi, We are trying to make a request form with the usual info, like name, address, which would be required fields, which we can figure out.  But also, the form would have radio buttons to select the purpose/reason of the request form. So, you would have Reason/Purpose A, Reason/Purpose B, and Reason/Purpose C. Each reason/purpose would require different user input on the form. So, how can one validate a field based on the Reason/Purpose option selected.  I realize this would require Javascript, either If{}'s or a swith{} statements.And, ifI was doing this on an html page, I would know how to do this. We just need to know how to do this in LiveCycle. Thanks

1 Reply

Avatar

Former Community Member

You would select your radio button group and make sure the script language is set to JavaScript. Then you can write your if / switch statements on the click event of the radio button group.