Enable / Disable Tab for a group
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
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
- Dmitry Kozlov
- Site Admin
- Posts: 1524
- Joined: Thu Jun 07, 2012
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
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
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
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
- Dmitry Kozlov
- Site Admin
- Posts: 1524
- Joined: Thu Jun 07, 2012
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
http://spform.com/office-365/cond ... ynamically
-
- Information
-
Who is online
Users browsing this forum: No registered users and 6 guests