Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagejs
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
languagejs
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.

...