Page 1 of 1

Hide disable a tab with a check box

Posted: 06 Mar 2017
by jpwallace
Hi,

I would like to enable a tab when a check box is ticked and when unticked the tab is disabled. I have seen;

if (fd.field('CheckboxField').value()) {
// Checked
} else {
// Unchecked
}

and http://spform.com/forms-designer- ... point-2010

however i am unsure how to layout the correct javascript to disale/enable a tab with a check box.

I have a similar thing working else where but its not based on a check box

Re: Hide disable a tab with a check box

Posted: 07 Mar 2017
by Dmitry Kozlov
Hi,

Try this:

Code: Select all

if (fd.field('CheckboxField').value()) {
    // Enable all tabs
    fd.tabControl(0).tabs('option', 'disabled', null)
    
} else {
    // Disable second tab
    fd.tabControl(0).tabs('option', 'disabled', [1])
}