Triggers the specified action on the current page.
There must be at least one button on the page that implements the action. This button can be hidden. The label and fieldID are optional and will restrict the button being targeted. If no label is provided, all buttons that implement this action will be triggered.
Executed
Client-side only.
Arguments
Argument | Type | Description |
---|---|---|
actionName | String, required | The name of the action to be triggered. Actions are described in the override function section of the Wizard Buttons article. |
label | String, optional | The button label to match |
fieldID | String, optional | The ID of the button to target |
Example
In this example the following handler has been added to a Radio Group field. The wizard button on that page of the form is hidden. When the value of a Radio Group field changes, it will trigger the NEXT function. The next button has the label "Continue".
function (helper, fieldName, value, valid, eventName) {
if (eventName == "CHANGE" && valid) {
helper.triggerActionButton("NEXT", "Continue");
}
}
Alternatively, the fieldID could be used.
Note that care needs to be taken when using
function (helper, fieldName, value, valid, eventName) {
if (eventName == "CHANGE" && valid) {
helper.triggerActionButton("NEXT", helper.getFieldID("MYNEXTBUTTON"));
}
}
This function works with a button generated by the Navigation Button Helper Handlebars helper. Note how the button's identifier is used to find it within the template.
function(helper) {
helper.triggerActionButton("NEXT", helper.getFieldID('MYTEMPLATE') + '_' + 'BUTTONIDENTIFIER');
}