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 show/hide section when click on button?

shrinivasprasad
Tera Expert

Hi All,

The section of the requested form will be visible when click on button any one please help

please send code for it.

Thanks in advance.

Thanks,

Shrinivasprasad 

1 ACCEPTED SOLUTION

Alok Das
Tera Guru

Hi Shrinivasprasad,

You should check the client(checkbox) true in ui action and mention the unique function name in the onclick field as: setsectiondisplay();

and write the code as below:

function setsectiondisplay(){
	g_form.setSectionDisplay('test',false);
}

Replace the 'test' with the section name

Make sure section name of your section, should be completely lower-case. Sections including spaces should use an underscore in place of the first space with the rest of the spaces removed.

Hope this will resolve your issue.

 

Kindly mark correct/helpful based on the impact.

 

Regards,

Alok

View solution in original post

5 REPLIES 5

shrinivasprasad
Tera Expert

Thank you all