Highlighted

Changing field from "optional" to "required" in JS

Avatar

16-02-2009

What JS code do I use to change a field (i.e., text field) from "Optional" to "Required"?

Replies

Highlighted

Avatar

Avatar

pguerett

Total Posts

(val/1000)?string[".0"]}K

Likes

611

Correct Answer

692

Avatar

pguerett

Total Posts

(val/1000)?string[".0"]}K

Likes

611

Correct Answer

692
pguerett

16-02-2009

FieldName.access = "readOnly"
Highlighted

Avatar

Avatar

pguerett

Total Posts

(val/1000)?string[".0"]}K

Likes

611

Correct Answer

692

Avatar

pguerett

Total Posts

(val/1000)?string[".0"]}K

Likes

611

Correct Answer

692
pguerett

16-02-2009

FieldName.access = "readOnly"
Highlighted

Avatar

16-02-2009

Paul - I am trying to change the state of 'Type' on the 'Value' tab under the 'Object' tab (the 'Type' is 'User Entered - Required', 'User Entered - Recommended', User Entered - Optional' and so on) through JS. I want to change these Types in JS based on user selection of the form.
Highlighted

Avatar

16-02-2009

Found answer



This works:



textfield.mandatory = "disabled"; //Optional

textfield.mandatory = "error"; //Required