Good evening gurus:
I have two fields that are interdependent.
- Field1 is set up as a drop down with 4 values (V1, V2, V4, V4)
- Field2 is a text box.
What i would like to achieve is the following:
- If field1 selected value is V1, then filling in field 2 is mandatory and the user cannot leave the field blank (checking that the field is not filled in with spaces is also necessary)
- if field1 value is not V1 then filling in field2 is not mandatory
Any suggestion on how to setup the javascript code? Is it a field level or document level script?
Any direction on a source of information for required field values other than setting it up in the properties window?
Thanks for helping!
MK
getField("Field2").required = (event.target.value == "V1");
Then, use our tools to create Field2 with a custom validation with a Regular Expression of:
^\S+
Jim Healy
FormRouter, Inc.
Check out our FREE Advanced Acroform Toolset:
http://www.formrouter.com/tools
Jim Healy, Founder & CEO FormRouter Inc.
Chapter Leader AUG RTP NC
http://www.formrouter.com