...
Code Block | ||
---|---|---|
| ||
var actions = form.getStageActions(); for(var i=0; i<actions.length; i++) { if(get(actions,i).getId() === 'S_Submit') // make sure the ID matches your Action { get(actions,i).setVisible(false); } } |
This will hide the Action buttons. The reason we do this versus simply setting the Action Buttons not to show on the page properties dialog box is because they need to exist for us to call them via JavaScript. This way they become part of the app and are hidden from view.
...
Code Block | ||
---|---|---|
| ||
var actions = form.getStageActions(); for(var i=0; i<actions.length; i++) { if(get(actions,i).getId() === 'S_Submit') // make sure the ID matches your Action { get(actions,i).activate(); break; } } |
This code will get the Action and execute it.
...