Actions
confirm
3 min
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 you can use it as a confirmation to request confirmation before performing an action you can use it as a confirmation after an action has successfully been performed examples and code snippets confirm action with modal confirm this example has a c onfirm action with a nested execute entity action after pressing the button 'update employee', a modal will be displayed here, you confirm if you wish to proceed when confirmed, the execute entity action will proceed example see the full example of confirm with modal in github https //github com/jigx com/jigx samples/blob/main/quickstart/jigx samples/jigs/actions/confirm/confirm with modal jigx confirm with modal actions \ children \ type action action list options title add an employee issequential true actions \ type action confirm options isconfirmedautomatically false onconfirmed type action execute entity options provider data provider dynamic entity default/form method create data firstname =@ctx components firstname state value lastname =@ctx components lastname state value phone =@ctx components phone state value modal title add an employee description are you sure you want to add a new employee? confirm 'add' cancel 'cancel' \ type action go back confirm action confirm action this example has a confirm action nested inside an execute entity action when the form is submitted, the confirm action will show a pop up stating that "employee was added successfully" 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 https //github com/jigx com/jigx samples/blob/main/quickstart/jigx samples/jigs/jigx actions/confirm/confirm jigx see the helper file github https //github com/jigx com/jigx samples/blob/main/quickstart/jigx samples/jigs/jigx actions/confirm/confirmation jigx confirm actions \ children \ type action action list options title add an employee issequential true actions \ type action execute entity options provider data provider dynamic entity default/form method create data firstname =@ctx components firstname state value lastname =@ctx components lastname state value phone =@ctx components phone state value 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 '' \ type action go back