Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

How to add Multiple Radio Button under each other

Naveen87
Tera Guru

Hey Guys,

I have a requirement , Where i have to field == Desk phone.

When Desk phone is selected , 2 radio buttons should be appear. A and B.

When A is selected , it will have C and D under it.

find_real_file.png

How to achieve this??

 

 

Please suggest.

Thank you

1 ACCEPTED SOLUTION

I've done as below:

find_real_file.png

find_real_file.png

find_real_file.png

View solution in original post

30 REPLIES 30

I've done as below:

find_real_file.png

find_real_file.png

find_real_file.png

Almost forgot, I also have onLoad script to hide the message on start. The form is beginning to look better than the form we have for new recruits. 🙂

function onLoad() {
   g_form.setDisplay('new_hire', false);
   
}

Hozawa i tried but isn't working for me.

find_real_file.png

find_real_file.png

find_real_file.png

find_real_file.png

find_real_file.png

 

Please suggest if i'm doing something wrong.

Syntax of .setDisplay is as follows:

.setDisplay('<label name>', true);

In the code you've posted, message is being passed instead of a name of a label. In my example, I have 3 variables defined on a form: (1) Select box, (2) Multiple Choice, (3) Label. In actually, there is a need to have multiple choice variable for each choice in the select box.

There is also a need to have label for each choice in the multiple choice variable.

"new_hire" in .setDisplay('new_hire', true) is the name of the label field and not a message.

find_real_file.png

Sorry I'm unable to understand.

Multiple choice (type) == Option (Variable name)

New Hire / Backfill/ Refresh == Choices under Option(variable)

find_real_file.png

 

Then i have created a new Label,

find_real_file.png