show / hide menu

How to Navigate in ClaySys AppForms using executeJavaScript function

In ClaySys AppForms, We can navigate back to a particular site from an AppForm using executeJavaScript function. So a user can navigate away to a specified URL in a button click or value change or according to the trigger in the form.

Here we are demonstrating a similar scenario and how to achieve navigation in a button click.

Create a form and drop a button control.

In the trigger of this button, a user must be able to navigate to a specified URL. For that the user should create a rule on the trigger of the button. Click on the Rules/Attributes tab and select create rule. It will lead you to the rule page and you can see button is already selected as the trigger.

Right click on the new rule tab and select Add Action.

As mentioned, a user can easily navigate to a URL by embedding JavaScript in the form actions. JavaScript can be embedded into the form using the ExecuteJavaScript() Function. The syntax of ExecuteJavaScript() function is shown below.

So a user only needs to write the JavaScriptCode inside the parenthesis. It is illustrated below,

Here when the user clicks the button, the page should navigate to ClaySys home page. Now save and check in the form. Form preview on button click is illustrated below.