UI Elements
The most important UI elements are simple buttons, checkboxes, radio buttons, and dropdown lists.
Users know these elements and feel very comfortable using them.
Those elements can be found in the “Standard” group of the object library.
One of the most important UI elements is the simple button. A button can be used to trigger the e-mail sending process or for testing purposes during the form development process.
In this example, the CONSOLE_ON button will be used to switch on the JavaScript console.
The scripting behind simple buttons should be coded for the CLICK event.
In this example, two buttons have been created to switch the JavaScript console on and off. The coding to achieve this belongs to the section on JavaScript and will be shown later.
Radio buttons are collected in groups. Again, be careful with naming conventions. Best practice is to use uppercase letters in the hierarchy to reduce possible errors in scripting later.
After you drag and drop new radio buttons into the group, they have to be arranged and named.
You also have to assign a value. Typically, numbers starting with “1” are used to differentiate the buttons that are pressed.
The scripting necessary to react to pressed radio buttons is very easy.
You can code for a radio button group, which means all coding at one place, but therefore more coding.
You can also code for each radio button, which means different places for all relevant coding and less of an overview of the entire script.
Good practice is to code everything concerning radio buttons on the CLICK event of the group (see variant 1).
Checkboxes are even easier than radio buttons. They do not need to be collected in a group like radio buttons; just place them where needed.
Again, take note of naming conventions in the hierarchy.
Checkboxes have an On Value and Off Value.
Typically “1” means that the checkbox is switched on and “0” means off.
The scripting needed for checkboxes is very simple. Again, the Click event is used to react on the user's input.
Dropdown lists are more difficult to create.
They contain the data binding for the field itself and the binding of a table with lots of rows holding possible choices. Those two bindings have to be observed separately.
In the example shown above, the binding of the field itself points to the ADDITIONAL_TEXT hierarchy field.
The selected choice list item will be transported to ADDITIONAL_TEXT.