You can add a button to a form to perform an action. Clicking a button on a form will launch the manual script releated to that button. For example, sending or receiving data.
Note! The button can only be added to the object card in the Objects section.
To add a button:
- Go to Administration - Objects and select the object card.
- Open the Fields tab on the sidepanel and select New Field.
- Drag the field onto the object card.
- In the Data Format, select Button.
- Specify the settings for the button in the sidebar:
- Field name - enter a name, which will be written on the button
- Color - select the color of the button
- Script - select a script that will be executed when the button is clicked
- Availability Conditions - select the conditions under which the button will be available on the form
- Hint - enter a hint that will appear when you hover over the button.
- Click the Apply button.
- Save your changes.
How to specify availability conditions:
- Select Availability Conditions in the sidebar.
- A window for setting conditions will appear. To add a condition, click Add condition and select a field from the list on which the button availability will depend.
- In the Value column, specify the values at which the button will be available.
- You can add several conditions - the button will be available when all of them are done. Click the Save button to save the condition.
The condition is removed if:
- The reference or object class that is used in the condition has been removed
- The field that is used as a condition has been removed
- The selected field is used in the new block
The button will be added to the form.