Enable / Disable Tab for a group

Discussions about Forms Designer for SharePoint 2013 / 2016 and Office 365.
Locked
wdeffner
Posts: 30
Joined: Thu Sep 22, 2016

09 Nov 2016

Hi,

Disabling and enabling a tab based on the content of a field works fine like this:

---

// Disable enable Tab
function setAdminTab() {
var status = fd.field('Anrede').control().value();
if (status == 'Frau') {
$('#fd_tabcontrol-0').tabs('option', 'disabled', null);
} else {
$('#fd_tabcontrol-0').tabs('option', 'disabled', [3]);
}
}

setAdminTab();

---

Now I would like to use the function IsCurrentUserMemberOfGroup in the if-statement but haven't been successful so far (Sharepoint 2013). I'm not familiar with Java-Script.

Thank you

Wolfgang

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

10 Nov 2016

Hi Wolfgang,

It's not a JS-function. You can use this method to create completely different forms for a certain SharePoint group. Please, watch the video:

https://www.youtube.com/watch?v=SBLD9hXr19o

https://www.youtube.com/watch?v=bI7TFO_bN6c

wdeffner
Posts: 30
Joined: Thu Sep 22, 2016

11 Nov 2016

Hi,

we have tried creating different forms based on group-membership or user-defined rules. This works very good and was one of the main reasons for purchasing SPForms.

However, this leads to a larger set of forms that have to be maintained in parallel. For this reason we were looking for a way to enable/disable single elements based on group-membership and/or user-defines rules.

If I understand you correctly, this is not possible.

Thank you

Wolfgang

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

11 Nov 2016

I see your concern. You can hide or disable fields or tabs conditionally via JavaScript but if the condition is based on user's membership, you should use groups. Please, read the post demonstrating our JS-framework:
http://spform.com/office-365/cond ... ynamically

Locked
  • Information
  • Who is online

    Users browsing this forum: No registered users and 6 guests