Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.

Form fields

Avatar

Former Community Member
Hallo!



I am creating an opinion poll form and want to disable certain questions based on answers selected by the users. How can I select which questions are to be deactivated upon answering a certain question?
1 Reply

Avatar

Former Community Member
if i haven't made any mistake anywhere... something like this:



if (RADIOBUTTON.rawValue == "mother")



{

TEXTFIELD.rawvalue = "";

TEXTFIELD.access= "readOnly";

TEXTFIELD2.rawvalue = "";

TEXTFIELD2.access = "readOnly";

}



else

{

TEXTFIELD.access= "open";

TEXTFIELD2.access= "open";

}



if you want to set other fields as soon as you select an option from a drop-down list, you can change the script to



if (xfa.event.newText == "mother")



{

and so on...