Form Section Hide/Show via Checkbox
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-18-2024 09:40 AM
I've been tasked with adding checkboxes to the standard Change Request form, to mimic an internal deployment document. I would like to toggle the visibility of section names based on checkbox true/false status via UI Policy, but I am having no luck.
1. Do the checkboxes refer to applications utilized by my company (e.g. Azure). Do these checkboxes need to tie to the Applications table?
2. If not, and this can be resolved by UI Policy alone, then this is an example of what I've tried with no success.
Condition : Azure is true
var isChecked = g_form.getValue('Azure') == 'true';
// Define the conditions for hiding/showing the section
if (isChecked)
{
// Show the section
showSection('azure_changes');
}
else {
// Hide the section
"hideSection('azure_changes');"
}
function hideSection(azure_changes) {
var section = g_form.getSection(sectionName);
if (section) {
section.style.display = 'none';
}
}
function showSection(sectionName) {
var section = g_form.getSection(sectionName);
if (section) {
section.style.display = '';
}
}
})(current, previous);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-18-2024 11:13 AM
Hi @Adam Kirk ,
Please try the approach suggested in the video below and make changes as per your requirement:
Show/Hide Form sections under some conditions | UI Policies
Mark this as Helpful / Accept the Solution if this helps.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-18-2024 11:16 AM
Hi @Adam Kirk ,
Please refer below thread:
If I could help you with your Query then, please hit the Thumb Icon and mark it as Correct !!
Thanks & Regards,
Sumanth Meda