Actions
go-back
4 min
this action is used to return to the previous page most jigs include this action automatically as an arrow to the left of the title of the jig this action can be used in a list of actions, such as swipeable and rightelement, or used together with another action, where go back is called after the main action and returns the user to the previous page configuration options a go back action can be set up in various ways as a separate action or in the action list as a swipeable action in the left or right direction as rightelement in the list as an associated action in the action list a go back action associated with another action under onsuccess can only be used with dynamic data examples and code snippets go back as an action the simplest example of a go back action is to use it as a separate action when configured, a button will appear at the bottom which will return us to the previous page when pressed in this case, the use of the function is unnecessary because as we can see in the screenshot there is an arrow to the left in the upper left corner this means that this jig already has a go back action automatically in it and the arrow has the same function as the "go back" button below examples see the full example using static data in github https //github com/jigx com/jigx samples/blob/main/quickstart/jigx samples/jigs/jigx actions/go back/static data/go back action/go back action jigx see the full example using dynamic data in github https //github com/jigx com/jigx samples/blob/main/quickstart/jigx samples/jigs/jigx actions/go back/dynamic data/go back action/go back action dynamic jigx go back action jigx actions \ children \ type action go back options title go back go back swipeable left/right this example uses the go back action as a swipeable property we can choose the swipe direction left or right after pressing the button, we return to the previous page examples left see the full example using static data in github https //github com/jigx com/jigx samples/blob/main/quickstart/jigx samples/jigs/jigx actions/go back/static data/go back swipeable/go back swipeable left jigx see the full example using dynamic data in github https //github com/jigx com/jigx samples/blob/main/quickstart/jigx samples/jigs/jigx actions/go back/dynamic data/go back swipeable/go back left dynamic jigx examples right see the full example using static data in github https //github com/jigx com/jigx samples/blob/main/quickstart/jigx samples/jigs/jigx actions/go back/static data/go back swipeable/go back swipeable right jigx see the full example using dynamic data in github https //github com/jigx com/jigx samples/blob/main/quickstart/jigx samples/jigs/jigx actions/go back/dynamic data/go back swipeable/go back right dynamic jigx left swipeable left \ label go back color primary onpress type action go back right swipeable right \ label go back color primary onpress type action go back go back rightelement in this example, we use the go back action as the rightelement in the list item component there is a button for each item examples see the full example using static data in github https //github com/jigx com/jigx samples/blob/main/quickstart/jigx samples/jigs/jigx actions/go back/static data/go back right element/go back right element jigx see the full example using dynamic data in github https //github com/jigx com/jigx samples/blob/main/quickstart/jigx samples/jigs/jigx actions/go back/dynamic data/go back right element/go back right element dynamic jigx goback right element rightelement element button title go back onpress type action go back go back on success in this example, we use the action go back with onsuccess to take you back to the main list after signing a form examples see the full example using static data in github https //github com/jigx com/jigx samples/blob/main/quickstart/jigx samples/jigs/jigx actions/go back/static data/go back on success/go back on success jigx go back on success title signature type jig default description in this example, the go to action is associated with the submit form action after we enter the signature and press the "sign" button, the submit form action is performed and then the go to action redirects us to the next page onrefresh type action reset state options state =@ctx jig components send signature go to state data onfocus type action reset state options state =@ctx jig components send signature go to state data actions \ children \ type action execute entity options title sign & go back to actions provider data provider dynamic entity default/form method create data signature =@ctx components signature state value onsuccess type action go back children \ instanceid send signature go to type component form options isdiscardchangesalertenabled false children \ instanceid signature type component signature field options label signature required