hub.eb?material_id=199&track_id=350

URL Parameters


A Field can be initialised by adding a parameter to the URL when navigating to a Form. The name of the parameter in the URL must match the name of the Field and the value must be the correct type and format for the Field.

For example, https://www.mydomain.com/myForm.eb?myField=5 will initialise the Field named myField to 5

Before a Field can be initialised like this however it's URL Parameter property must be enabled.

Fields initialised via the Verj.io JavaScript API's form.callForm() or form.gotoForm() functions must also have their URL Parameter property enabled.

When running a Form from the Verj.io Studio, a dialog will be displayed to enter values for any URL Parameter Fields in the Form:

Run Form With Parameters

Steps


1

Create two Forms and name them paramOne and paramTwo.

2

Add a Field named msg and drag it onto paramOne's Page.

3

Add a Button Control to paramOne's Page with the text: Go to ParamTwo.

Create a Script containing the following code and add it to the Button Control's On Click Event:

var params = {
  message: fields.msg.value
}

form.gotoForm("paramTwo", params);
4

Add a Field called message to paramTwo and enable its URL Parameter property.

Drag it onto the Page and set the resultant Field Control to Display Only.

5

Run paramOne and add some text to the msg text box.

Click the Go to ParamTwo button. Note that, message has been populated with the text entered into paramOne.

Current Module

Related