Actions

<< Click to Display Table of Contents >>

Navigation:  NITRO™ Forms > Left-side Pane >

Actions

Adding Action buttons to your form will run scripts, custom actions, and workflows.

 

Actions that you can add to Forms

 When using separate forms for New, Edit, and Display:

 New Form - Script Action and Submit Action

 Edit Form - Script Action and Submit Action        

 Display Form - Custom Action only

 

 When using one form for New, Edit, and Display -- you can add Script, Submit, and Custom Action buttons to the one form in the Designer, but the buttons show up as follows:

         New - Script Action and Submit Action

         Edit - Script Action and Submit Action

         Display - Custom Action        

 

Adding an Action to a Form

To add an action, select Actions on the left side of the Forms Designer. Expand the Actions section and choose an Action.

 

         Actions on form

 

 New and Edit forms

Script Action - this will run a script, but it will not submit the form.

Submit Action - this will run a script and/or a custom action and submit the form. The Custom Action is one that has been configured in the NITRO Custom Actions app. The Submit button needs either a script or a custom action (or both) to be added to the form.

 

Actions for new form

 

 Display form

Custom Action - this will run a custom action that has been configured in the NITRO Custom Actions app.

 

custom action on display form

 

 

The selected Action button can be dragged and dropped to a location on the tab or section, or to the area above or below the tab or section.

The area above the tab or section is the "Top Action Panel"; the area below the tab or section is the "Bottom Action Panel".

 

In the image below, 1 is buttons in the Top Action Panel, 2 is buttons in the tab or section, and 3 is buttons in the Bottom Action Panel.

 

Note: any number of buttons can be added to a form, though of course they need to have some function or reason to be there.

 

Action Panel

 

When you click on a button that you have placed on the form, the Action Settings window will pop up on the right side. In this window, you can edit the following for this button:

 

For buttons placed in a tab or section, these options show up:

 Button Title - the caption on the button

 Button Width - the width of the button

 Button Alignment - Left, Center, or Right

Type - the image or icon that goes on the button. Images can be uploaded; icons can be chosen from the list provided.

 Script Function - explained below - this shows up for Script and Submit buttons

 Custom Action - explained below - this shows up for Submit and Custom Action buttons

 Permissions - explained below -- a button can be shown or hidden based on users and conditions.

 

For buttons placed in the Top or Bottom action panels, these options show up:

 Button Title - the caption on the button

Type - the image or icon that goes on the button. Images can be uploaded; icons can be chosen from the list provided.

 Script Function - explained below - this shows up for Script and Submit buttons

 Custom Action - explained below - this shows up for Submit and Custom Action buttons

 Permissions - explained below - a button can be shown or hidden based on users and conditions.

 

The width and alignment of buttons in the Top and Bottom action panels is a special case. The width of these buttons is fixed. The alignment is set in the Layouts and Theme area of the left-side pane, where there is a "Buttons" section. As you can see in the below image, there is a Top Action Panel Buttons Align and a Bottom Action Panel Buttons Align drop list with Left, Center, and Right choices. Above them are two checkboxes. These only apply to the Bottom Action Panel:

 

Hide Save Button - you can hide the Save button and replace it with a Submit Action button. If you align this Submit Action button to the right, you can effectively substitute this button in for the default Save button and have it show up in the same location as the Save. You can add whatever caption is appropriate on this button and thereby create a specific set of actions that happen when the item is saved (submitted).

 

Hide Cancel Button - similar to "Hide Save Button", you can substitute in a new Script Action button for the Cancel button.

 

Note: this only applies to New and Edit forms, since the Display form just has a Close button on it.

 

 Layout and themes for button

 

The image below is a form with the default Save and Cancel buttons hidden and new Script and Submit buttons placed in that location in the Bottom Action Panel. Of course, the button captions and icons would likely be changed, and there would be appropriate scripting and custom actions behind these buttons.

 

form with script and submit button

 

 

Script Function

 

The Script Action and Submit Action allow JavaScript to be entered in the "Script Function" text box. The box has a function there that gives list and form context. You can find example scripts and more information for both Script Action and Submit Action in the Using JavaScript section of this Manual.

 

Action button settings

 

The Script Action button only allows scripting to be run . The Submit Action button allows scripting and/or a Custom Action (as defined in the NITRO Custom Actions app) to be run. The Custom Action button only allows a Custom Action (as defined in the NITRO Custom Actions app) to be run.

 

Script Action Button - Action Settings: Scripting only

The scripting is entered as described above. click edit button besides Process. below form will open. for Script Function, select 'Script' in 'Process'.

 

scripting function for script button

 

For form event action, select 'Form Event Action' in 'Process'.

 

Form event action for script

here, you can select form event action from dropdown that you want to execute for script or submit button.

 

Submit Action Button - Action Settings: Scripting and Custom Actions

The scripting is entered as described above. The Custom Action is selected from the drop list. The gear icon will open the Custom Actions app, where a Custom Action can be created or edited. The circular arrow icon will reload the Custom Action list after the Custom Actions app runs.

 

Submit button settings:

 

 submit button settings

 Submit button settings 2

 

click 'Edit' button besides 'Pre-Save' Process, below form will open

 

 pre save script function

 

 For form event action, select 'Form Event Action' in 'Process'.

 

 Form event action for submit button

 

 Select form event action from dropdown to execute as Pre-Save Action. Select form event action from dropdown to execute if validation fails.

 

 

Custom Action Button - Action Settings: Custom Action only

The Custom Action is selected from the drop list. The gear icon will open the Custom Actions app, where a Custom Action can be created or edited. The circular arrow icon will reload the Custom Action list after the Custom Actions app runs.

 

custom action button settings

 

 

Permissions

The Permission on the Actions are very similar to the Permissions on Tabs, Sections, and Columns. See that section. The one exception is that a button cannot be "read-only" - it is either shown or hidden.

 

 Permission

 

Style:

 
       To override button style, select this option.
 
       Override btton style
       Click 'Edit' button. below form will open.
 
       edit button style
 
       edit these settings as per requirement.

 

 

 

Please refer below articles for more details

Show Confirmation Message On Clicking Submit Button In NITRO Forms