Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

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

Not applicable
What JS code do I use to change a field (i.e., text field) from "Optional" to "Required"?
4 Replies
Not applicable
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.
Not applicable
Found answer

This works:

textfield.mandatory = "disabled"; //Optional

textfield.mandatory = "error"; //Required