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

How can I make a field required based on the response in another field?

Avatar

Level 1

I'm a totally novice so please be gentle with me

I am developing a form in Livecycle and I need to make one field required based on the contents of another ie if the user answers yes in FieldA then they must answer the question in FieldB.  I have searched through the forum and found some similar queries related to checkboxes and required fields and I've tried that but as I haven't even found the scripting yet (hanging head in shame now), it's proving very difficult.

I would be very grateful if someone could advise me (in the simplest terms possible) what I need to do to fix this issue.

Thanks

Ellen

2 Replies

Avatar

Level 2

Ellen,

If its a Yes/No check box

In the click event of Yes Check box

FieldB.mandatory="error";

In the click event of No Check box

FieldB.mandatory="disabled";

Hope this helps.

~Abhiram

Avatar

Level 1

Hi ~Abhiram

Thanks for you response.  I was using a Yes/No drop down list box, I've changed it now to a check box but can't find the click event , sorry I am a total novice.