This tutorial shows how to set the initial value of form field using a database query without using scripts or Java code.
You can use a database connector to retrieve the initial value of a field from a database. This works for single valued items and multivalued items such as drop-down lists or tables. The connector automatically returns a data structure suitable for the form widget.
This page uses an example of two steps in a process:
- In the first step, the user sees a drop-down list of user ids and chooses one.
- In the second step, the user sees the first name, last name and email address of the user with the selected user id.
The data is stored in a MySQL database, in a table called users: