Expand my Community achievements bar.

Script to change field to required?

Avatar

Level 2

Anyone know what the script is to make a text field required.

Making a form that when box is checked they have to fill in an identifying number. I was planning to do this through an on click script but cant seem to find the call out to change that formatting. Any help is apprecitated thanks

Shawn

1 Reply

Avatar

Level 2

Found it

TextField1.validate.nullTest = "error";

 

You can also use one of these two scripts:

    TextField1.mandatory = "error"  TextField1.mandatoryMessage = "this field is mandatory!"    

Now the question is how do you turn it off if they check the no box