Hide disable a tab with a check box

Discussions about Forms Designer for SharePoint 2013 / 2016 and Office 365.
Locked
jpwallace
Posts: 47
Joined: Fri Mar 03, 2017

06 Mar 2017

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

User avatar
Dmitry Kozlov
Site Admin
Posts: 1524
Joined: Thu Jun 07, 2012

07 Mar 2017

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])
}

Locked
  • Information
  • Who is online

    Users browsing this forum: No registered users and 22 guests