Enable / Disable Tab for a group
Posted: 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
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