In FormBuilder we have defined a set of functions that can be used for anything from summing variables to displaying the username on a form. The Page Level JavaScript feature can be used to define thousands of custom functions to perform various tasks. Check out W3 Schools for an introduction to JavaScript.
W3 Schools is a great resource to learn how to enhance the iFormBuilder experience through use of dynamic code.
Concatenation of Two Elements
Lets say you have two different form elements that you want to combine into one element. Inside the newly created element you will want to place the two data column names from the elements you want to combine in the Dynamic Value of the new element. So if we have two elements called first_name and last_name and you want to combine them you dynamic value statement will be:
{first_name + “ “ + last_name}
**Ensure the “ “ is included between the two data column names so that there is a space in between the first and last name.
If you would like to combine more elements your statement will look like this:
{first_name + “ “ + last_name + “ “ + data_column_name…….}
Display Current Date or Time
Place the Following JavaScript in the Dynamic Value when using the following elements
Date-Time:
new Date() **Displays the Date and Time Format: 4/26/12 6:25 PM
Date:
new Date() **Displays the Current Date Format: Apr 26, 2012
Read-Only:
new Date() **Display the current Date and Time Format: Thu Apr 26 2012 18:25:38 GMT-0400 (EDT)
Time:
new Date() **Displays the current Time Format: 6:25 PM
Text:
new Date() **Display the current Date and Time Format: Thu Apr 26 2012 18:25:38 GMT-0400 (EDT)
Default Values of Widgets
Defaulting Values of widgets can be used to greatly increase the power of your form. Refer to the information below to see how you can default individual widgets.
Date:
Dynamic Value: new Date()
Date-Time:
Dynamic Value: new Date()
Email:
Dynamic Value: {"iformkiosk@iformbuilder.com"}
Number:
Dynamic Value: {5}
Number:
Dynamic Value: {5}
Phone Number:
Dynamic Value: {"717-220-4205"}
Pick List:
Dynamic Value: {0} **Sets the value of the pick list to the first option in the lists using {1} will set the value of the pick list to the second option in the list.
Range:
Dynamic Value: {8}
Read-Only:
Dynamic Value: {"Good Morning iFormBuilder"}
Select:
Dynamic Value: {0} **Sets the value of the select to the first option in the lists using {1} will set the value of the selectt to the second option in the list.
SSN:
Dynamic Value: {"123-45-6789"}
Text:
Dynamic Value: {"Hello"}
Text Area:
Dynamic Value: {"Hello welcome to the iFormBuilder Clipboard Replacement Solution. You will certainly be impressed with our platform :)"}
Time:
Dynamic Value: new Date()
Zip:
Dynamic Value: {"18732"}
Comments
0 comments
Please sign in to leave a comment.