This demonstration illustrates the use of regular expressions and question events. We used a Page Header at the top of the Dynamic Form, and removed the Help icons to the left of the questions (General Settings/Hide Help Icons).
Below is a breakdown of each field and how it is set up.
***This module is enabled with Content Localization. We have programmed it to reflect Dutch for the Nederlands, though the number of languages you can have is limitless. If you choose Nederlands in the drop down located above this text, then each question is changed to Dutch.
1) Salutation - combo box.
2) First Name - regular text box, required field.
3) Last Name - regular text box, required field.
4) In which country do you live – combo box. Each choice in the combo box has multiple question events tied to it, thus choosing a certain initiates specific questions.
5) State:
· If user chooses USA, next option is to choose a US state. Drop down combo box for US state is done through SQL Driven Options.
o Choosing USA also prompts the user to enter a US phone number, which is validated using a regular expression.
· If user chooses Canada, next option is to choose a Canadian Province. Drop down combo box for Canadian Province is done through SQL Driven Options.
o Choosing Canada prompts the user to enter either a foreign or US phone number, and the phone number is not validated with a regular expression.
· If user chooses Mexico, next option is to choose a Mexican state. Drop down combo box for Mexican state was manually entered. ***Note: not all Mexican states are listed.
o Choosing Mexico prompts the user to enter either a foreign or US phone number, and the phone number is not validated with a regular expression.
6) Mailing address: regular text box.
7) ZIP or postal code: text box.
8) Phone Number:
· US - we used a regular expression for the phone number that forces the number to be entered in the following way: ###-###-####. If the user enters letters or does not enter dashes between area code or suffix, they will be asked to enter in a valid entry. We also used a Text Header on the phone number text box that instructs the user what the valid format is. Regular expression used: \(?\d{3}[-.]\)? ?\d{3}[-.]\d{4}
· Canada or Mexico – regular text box.
9) Email – regular text box.
10) How do you prefer to be contacted – radio buttons with default set to Email (Advanced Field Options/Default Value)