vendredi 13 mars 2015

SP Designer - Hiding Tabs on Tab Control Based on Read Only Field



I have the following JS code which works if I do not make the field read-only, however I need AllUsers to be unable to edit this field.


I tried to use a calculated field instead but this did not work either. The calculated filed is PMOLifecycleStage.


Any ideas on how I can make it work?


// Initiate TAB function setInitiateTab() { var v = fd.field('LifecycleStage').control().value(); if (v == '(2) Initiate') { $('#fd_tabcontrol-1').tabs('option', 'disabled', [2,3,4,5]); } else { $('#fd_tabcontrol-1').tabs('option', 'disabled', null); } }


// Subscribe on status change fd.field('LifecycleStage').control().change(function () { setInitiateTab(); });


// Initialize setInitiateTab();








0 commentaires:

Enregistrer un commentaire