hi, need to hide the SAVE button within a table, although an user has only reader
access to a form, it can double click on a table's record, and the Save button is still
active, need to setActive(false) / setVisible(false).
I put all the table's fields into a protected section, but still need to hide the Save Button.
it seems form.getStageActions() it's only for the main form, not the table.
thanks in advance
Lea
Hey,
I would probably just add a script within the onShow() event of the item i dont wanna show (the button in this case) and use
item.setVisible(false);
Does that not work for you or did I not understand your question correctly?
This solution works for most items, however it does not work in this situation because the authoring environment does not expose the table action buttons and their events.
We do have a few limitations within tables. The rules dialog does not allow the author to change the behavior of a table action button based on field values. This does seem like something that we could consider adding (please submit an idea in our ideas portal if it does not exist).
You could add this to the 'onShow' event of the table:
dojo.query(".lotusDialogFooter .yes-ok-btn").style("visibility", 'hidden');
This will hide the Add/Save button, so you will likely need to add some conditional logic around when you apply it.