Toggle menu

Script Button

When this button is pressed the JavaScript function you enter will be executed.

Properties

LabelDescriptionType Name
iCM Panel Button Icon Class NameThe icon class name to use when displaying this button as an action in the iCM Action Panel. Only relevant when the "Is iCM Panel Button" property is set to true and the containing form is running as an iCM Form App shortcutICMPANELBUTTONICONCLASS
Is iCM Panel ButtonIf set to true and the form is being used via a Form App shortcut within iCM, the button will be rendered as an action within the Actions Panel. The button itself will be hidden on the form. This allows better integration into iCM when neededISICMPANELBUTTON
Button LabelThe label that will appear on the buttonLABEL
Button TypeEither "Normal" or "Contrast". Selecting contrast adds the class "icminput--contrast" to the field's input element, which can then be targeted by the site's style sheetBUTTONTYPE
JavaScriptThe script to be executed when the button is pressed. If the button is being rendered in the iCM Actions Panel, this script will be executed when the action is selected.

The Helper Library is supplied as the first argument when this function is called. For example,

function (helper) {
    helper.setFieldValue('REQUESTEDPAGE', 'COMPLAINT');
    helper.triggerActionButton('NEXT');
}

Script Button
 
Note that as this is a client-side script, executed by the button press, it won't be executed server-side, or be able to interact with server-side functions
SCRIPT
Script URLThe URL of any additional JavaScript to be loaded. This script will be loaded so it's available to use in the JavaScript functionSCRIPTURL
Additional Styling ModifierAn optional CSS modifier for the field. See Common Field Properties for an exampleADDITIONALSTYLINGMODIFIER
DocumentationAdd documentation to your field to help explain any complex functionality to future users. You might include information on what the field does and how it relates to other fields on the form. Notes added here are only ever visible in the Forms Designer, they can be searched for, viewed and downloaded from the action panel. See Common Field Properties for an exampleDOCUMENTATION

Share this page

Facebook icon Twitter icon email icon

Print

print icon