Remove element (optional/repeatable element)
Actions – Abstract
The Remove element action is used to remove elements from an Optionale Element container or a Repeatable element container.
The Remove element action can be used to remove elements from one of the following container types:
Optional elements container
Repeatable element container
The action is only available as a choice under Action type, if an appropriate target element has been linked. Configuration details are described in the sections below for each container type.
Executing Remove element is equivalent to clicking the
symbol for the corresponding container and may assume that role completely, e.g. if the symbol is defined as invisible in a form because removing elements should only be driven by behaviours.
Elements can be added to both types of containers by related action Add element (optional/repeatable element).
Optional element container
In combination with an Optional elements, the target element must be one of the optional elements in the container.
When the action is executed, the option linked as a target element is removed if it exists in the container.
Configuration example:
An Optional elements container provides options for an order, which may contain complex content (here: remarks), and therefore should only be removed after user confirmation.
Removing the option should only be possible via a button within the option, which triggers the action Remove elements depending on the User confirmation ('Yes').
In the screenshot on the right, the behaviour for the Remove button for 'Option A' is shown.
For 'Option B', this behaviour can be copied with an adjustment for the target element. In place of User confirmation, another behaviour, e.g. Static (true), can be used to delete without confirmation.
Result:
Example input in a form |
After clicking 'Remove' |
|
|
Repeatable element container
In combination with a Repeatable element container, the target element for this action must be the repeated element inside the the container.
If the action is called from within the repeatable element and without the option For duplicates also checked, only the current instance of the repeated element is removed.
With the option For duplicates also checked, all instances are removed. The action can be called from inside or outside the container.
Configuration example:
In the context of the example for the Optional elements container in the previous section, the following behaviour will remove all remarks for 'OPTION A':
The repeated element 'Remark_A' defining the row element for Remarks for OPTION A was linked as a target element here.