ProTip: Use Database Fields to Auto-Fill Your Forms

Pre-populate your digital forms with database information

GoFormz can make filling out forms a breeze by pulling structured information from DataSources to automatically populate multiple fields at once. This is accomplished using a Database field in conjunction with several Text fields.

A Database field works just like a Drop Down menu — it shows a list of items from which a user can make one selection — except it draws its list of items from a GoFormz DataSource column. When compared with a regular text entry field, this approach reduces opportunities for error and encourages standardization, because it provides form users with a predetermined set of options to pick from.

But the benefits of using a Database field go a lot farther than that. You can actually auto-fill fields in your form, based on the value that the form user selects from the Database field. For instance, choosing a customer’s name can automatically fill in fields for the customer’s phone number, address, email, and more. This can lead to tremendous savings in time, more accurate data, and a more streamlined data collection process.

Before adding this functionality to your template, you must have a DataSource set up (check out this ProTip about how to set up a DataSource). In the example below, we use the “AXIS Customer List” DataSource that comes standard with your GoFormz account. This DataSource stores the customer’s name in the “Key” column, and stores information about each customer in columns called “Phone”, “Address”, “Email”, etc.

Configuring your form to auto-populate fields from a DataSource is easy. Just open your form in the Template Editor and do the following:

1. Drag-and-drop a Database Field onto your Template (or select a pre-existing Database Field).

2. In the Properties panel, add a Name for your Database Field, then select the DataSource and Display Column. In the example below, we chose the “Key” column from our “AXIS Customer List” DataSource, which means that this field will show a selectable list of customers from the DataSource.

3. Next, drag-and-drop Text fields for each of the items that you want to auto-populate. In our example, we have fields called Phone, Address, City, State, Zip, and Email.

4. For each of these Text fields, set up the Default Value in the Properties panel to draw data from the appropriate DataSource column. You can accomplish this by using this formula:

=database("DataSourceName", [KeyField], "ColumnName"), and filling each of the three arguments in the formula with the right information. In the example below, the Default Value is =database("AXIS Customer List", [Customer Name], "Phone"). This tells GoFormz to take the value in the “Customer Name” form field that we set up in steps 1 and 2, look it up in the “AXIS Customer List” database, and then place the corresponding value from the database’s “Phone” column in this field.

Set up all your other auto-fill fields with analogous formulas, and you are done! Filling in the Customer Name will now auto-populate all the related fields, boosting data accuracy and saving time each and every time the form is used.

For more in-depth documentation on configuring Database fields, check out our Help Center article.