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

Adobe Summit 2023 [19th to 23rd March, Las Vegas and Virtual] | Complete AEM Session & Lab list

Making a Text Field Required if User Checks box

Avatar

Not applicable
Hi,

I am currently using Adobe Designer 7.0, and am trying to make a text field required if a user clicks on a check box above the text field.

I have the following code for the check box (on Change) but it doesn't appear to be working!! Any suggestions??

Thanks!



if (this.rawValue == 1 ){

TextField7.value = "User Entered - Required";

}



else {

TextField7.value = "User Entered - Optional";

}
2 Replies

Avatar

Not applicable
Hi Krisitan,



you are trying to change the value of the field instead of it's accessability.



Try this:



if (this.rawValue == 1 ){

TextField7.mandatory = "error";

}

else {

TextField7.mandatory = "disabled";

}

Avatar

Not applicable
Does this work in LiveCycle 7.2, and where is the documentation on this?