Use the Update form action to implement dynamic forms by changing the Form's appearance and data while it is open in response to user action on the form such a click on a button, checkbox, or a change in the current value of a picklist, checkbox or a date (date/time) field. You may make multiple changes to the form in one Update form action.

  • Form: select the form for which you're planning to execute this Update form action.

    Note. The primary goal of selecting a form here is to provide you with a list of fields below. Mapsly does not restrict you to using this Update form action only with the selected form - you may execute it for any form as long as the references fields exist on the form.

  • What to update: specify what changes you'd like to make to the form fields by clicking the + button and filling in the action/field/value block(s):

    • Action: select one of the following available actions:

      • Show field: shows the selected field, if it was hidden.

      • Hide field: hides the selected field, if it was visible on the form.

      • Set visibility: shows or hides the selected field depending on the target value: 1 will show the field, 0 will hide it. Set visibility allows you to change the visibility of a field in one Update form action based on a condition.

        Example: on the example screenshot above we use the following Twig template in the target value:
        {{ form.fields.followup.value is empty? '0': '1' }}
        This Twig template reads the current value of a picklist field with the API name followup, which contains follow-up options and, if the user selects any of the them, shows resolves into 1, so Set visibility shows the Follow Up Reminder field. When the user clears the followup picklist, which sets its value to an empty string, this Twig templates resolves to 0, so the Follow Up Reminder field is hidden.

      • Set label, Set description and Set value change the selected field's label, description and the current value, respectively.

        Example: in the example above we use the following Twig template in the target value:
        {{ form.fields.followup.value }} Reminder
        which updates the label of the follow up reminder field to
        Email Reminder, Call Reminder or Visit Reminder depending on which item is selected in the followup picklist.

      • Set picklist items updates the selected picklist's items. The target value should be a valid JSON-array with the new list of picklist label/value pairs, as described here.

Did this answer your question?