- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
Problem: Show/Hide Form Sections with client scripts is used quite often and is a very simple , unless you have a long section name with multiple spaces.
Solution: This blog will cover how to tackle all scenarios to hide/show form sections with client side code.
No Spaces in the section name:
For Eg, you have a section called 'Planning'.
To Hide: g_form.setSectionDisplay('planning', false);
To Show: g_form.setSectionDisplay('planning', true);
One Space in the section name: Just replace the space with _
For Eg, you have a section called 'Related Records'.
To Hide: g_form.setSectionDisplay('related_records', false);
To Show: g_form.setSectionDisplay('related_records', true);
Multiple Space in the section name: Replace first space with _ and remove all other spaces
For Eg, you have a section called 'Process And Compliance Details'.
To Hide: g_form.setSectionDisplay('process_andcompliancedetails', false);
To Show: g_form.setSectionDisplay('process_andcompliancedetails', true);
I have spend a few hours in the past struggling with this, and recently saw some else struggle as well so decided to write about this.
Hope it helps.
- 1,877 Views
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
