How to set the value of a field on the form to what is entered in the form URL parameter?
Last Update: November 20, 2017
Using the below steps, you can test whether a specific parameter is presented in the URL or not. In our case we will get the value for "Language" parameter and set it to a TextBox control. Here are the steps on how to do that:
- Open the form in
design mode.
- Add a TextBox control and name it "txtURLValue".
- Click on an empty space in the form.
- Expand the Form Rules pane in order to add a form rule.
- In the
Rules pane, click on the Add icon to add a new rule, the
Rule Manager dialog will open.

- Add a new rule at Date1 control as follows:
A. Change the
Rule Name as desired.
B. Change the
Rule Type to Action.
C. Change the
Event Type onLoad.
D. In the
Condition section, type the following:
getFormQueryString('Language') != null
E. In the Action section, type one of the following script:
a. setValue(txtURLValue, getFormQueryString('Language')!= null? getFormQueryString('Language'): '')
b. try{
setValue(txtURLValue, getFormQueryString('Language'))
}catch(ev){}
F. Click on the Save button to save the rule.
Note: You can use
Assistance Panel to help you adding functions and related parameters, form variables and form controls to
Conditions and/or
Actions sections. - Test the form by clicking on the
Preview button in the
View group.