Actions
open-url
5 min
this action opens a web page depending on the provided url or deep links https //docs jigx com/deep links to an external app open url can be used in a list of actions, such as swipeable and rightelement , or with another action; after the main action is executed, open url is called and opens the configured url configuration options an open url 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 core structure title provide a title for opening the url, you can use expressions in the title field url specify the url you want opened the following formats are supported https // https //www https //www www http //www sitename com external app link (see the deep link to an external app example) examples and code snippets open url as an action the simplest example of using an open url action is to use it as a separate action thanks to this, a button will appear at the bottom, which, when pressed, will open the specific url that we set up example see the full example in < github https //github com/jigx com/jigx samples/blob/main/quickstart/jigx samples/jigs/jigx actions/open url/open url action jigx actions \ children \ type action open url options title jigx documentation url https //docs jigx com/examples/open url open url swipeable left/right this example uses the open url action as a swipeable property we can choose the swipe direction left or right after pressing the button, it will open the specific url that we set up example see the full example in github https //github com/jigx com/jigx samples/blob/main/quickstart/jigx samples/jigs/jigx actions/open url/open url swipeable jigx item type component list item options title =@ctx current item lastname subtitle =@ctx current item firstname leftelement element avatar text " " uri =@ctx current item img swipeable left \ label open url onpress type action open url options url https //docs jigx com/examples/open url right \ label open url onpress type action open url options url https //docs jigx com/examples/open url open url rightelement in this example, we use the open url action as the rightelement in the list item component there is a button for each item example see the full example in github https //github com/jigx com/jigx samples/blob/main/quickstart/jigx samples/jigs/jigx actions/open url/open url right element jigx item type component list item options title =@ctx current item lastname subtitle =@ctx current item firstname leftelement element avatar text " " uri =@ctx current item img rightelement element button title open onpress type action open url options url https //docs jigx com/examples/open url open url onsuccess in this example, the open url 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 the specific url will be opened example see the full example in github https //github com/jigx com/jigx samples/blob/main/quickstart/jigx samples/jigs/jigx actions/open url/open url on success jigx open url on success jigx actions \ children \ type action action list options title sign and go to documentation issequential true actions \ type action execute entity options provider data provider dynamic entity default/form method create data signature =@ctx components signature state value onsuccess title succesfully signed actions \ type action open url options title open the documentation url https //docs jigx com/examples \ type action go back use open url to deep link to an external app in this example, the action open url is used with a deep link that opens the google maps app to a specific location there are two code examples, one for ios and the other for andriod open google maps ios open url title zoos in the usa type jig default actions \ children \ type action open url #ios options title directions \# add the external app's ios deep link in the url url comgooglemaps\ //?center=32 7347483943, 117 150943196\&zoom=14 children \ type component image options source uri https //c8 alamy com/comp/2gft773/san diego california 25 aug 2021 san diego zoo main entrance in balboa park 2gft773 jpg \ type component entity options children \ type component entity field options label san diego zoo value the san diego zoo is 100 acres in size it is well known for its lush, naturalistic habitats and unique animal encounters and is home to more than 3,700 rare and endangered animals representing approximately 660 species and subspecies and a prominent botanical collection with more than 700,000 plants android open url title zoos in the usa type jig default actions \ children \ type action open url #android options title directions \# add the external app's android deep link in the url url google navigation\ q=2920+zoo+dr,san+diego,ca+92101,united+states children \ type component image options source uri https //c8 alamy com/comp/2gft773/san diego california 25 aug 2021 san diego zoo main entrance in balboa park 2gft773 jpg \ type component entity options children \ type component entity field options label san diego zoo value | the san diego zoo is 100 acres in size it is well known for its lush, naturalistic habitats and unique animal encounters and is home to more than 3,700 rare and endangered animals representing approximately 660 species and subspecies and a prominent botanical collection with more than 700,000 plants