website logo
👥 Community🎯 Samples on GitHub🚦System Status
💡 Guides
🚀 Examples
🍕 Developer Reference
⚡️ Changelog
🎥 Video Library
Navigate through spaces
⌘K
Examples Overview
Setting up your solution
Jig Types
Components
Datasource
Actions
Preview
Widgets
Expressions
Aggregation
Boolean
Comparison Operators
Date & Time
Path Operators
Functional Programming
Jigx Variables
Predicate Queries
String
Docs powered by
Archbee
Actions

confirm

5min

The confirm action creates a pop-up prior to an action being performed. This usually serves as a safety net for a user attempting either a destructive action or an action that could have other implications for the user, such as asking whether a user wishes to proceed with deleting a record.

This action can also be used as a confirmation to provide feedback after an action has been performed.

The action allows for customizable wording on the confirmation modal and can be set to take place automatically or not.

Configuration options

A confirm action can be set up in various ways:

  1. You can use it as a confirmation to request confirmation prior to performing an action
  2. You can use it as a confirmation after an action has successfully been performed

Examples and code snippets 

Confirm action with modal

Document image


This example has a submit-form action nested inside a confirm action. After pressing the button 'Update employee', a modal will be displayed - here you confirm if you wish to proceed. When confirmed, the submit-form action will proceed.



Example:

See the full example of confirm with modal in GitHub.

confirm-with-modal
|
actions:
  - children:
      - type: action.confirm
        options:
          title: Add an employee
          isConfirmedAutomatically: false
          modal:
            title: Add an employee
            description: Are you sure you want to add a new employee?
            confirm: 'Add'
            cancel: 'Cancel'
          onConfirmed: 
            type: action.submit-form
            options:
              formId: simple-form
              provider: DATA_PROVIDER_DYNAMIC
              entity: default/form
              method: create
              goBack: previous




Confirm action

Document image




This example has a confirm action nested inside a submit-form action. When the form is submitted, the confirm action will show a pop-up stating that "Employee was added successfuly". Note that as seen in the image, there is no option to confirm since isConfirmedAutomatically is set to true. But you can see the result of the automatically confirmed action by tapping on "See the confirmation".



Example:

See the full example of confirm in GitHub.

See the helper file here.

confirm
|
actions:
  - children:
      - type: action.submit-form
        options:
          formId: simple-form
          provider: DATA_PROVIDER_DYNAMIC
          entity: default/form
          method: create
          title: Add an employee
          goBack: previous
          onSuccess:
            title: Employee was added sucessfuly
            actions:
              - type: action.confirm
                options:
                  title: See the confirmation
                  isConfirmedAutomatically: true
                  onConfirmed: 
                    type: action.go-to
                    options:
                      linkTo: confirmation
                  modal:
                    title: ''




See also

  • Developer reference



Updated 21 Jun 2023
Did this page help you?
PREVIOUS
action-list
NEXT
execute-entities
Docs powered by
Archbee
TABLE OF CONTENTS
Configuration options
Examples and code snippets
Confirm action with modal
Confirm action
See also
Docs powered by
Archbee
Copyright © 2023 Jigx, Inc. All rights reserved. Terms of Service