Link controls to reference data

What you'll be learning:

  • how to link the choices of a drop-down control to reference data, so that they automatically update when the data changes

  • how to make the reference data accessible and editable to Editor-level users of the Backoffice website

This is a good time to recap what you've accomplished so far:

  1. you created a form to ask the user Yes/No questions about a variety of car parts

  2. you grouped the car parts-related controls into popup panels for a neat and well-organized look

  3. you allowed the user to add controls for additional car parts

Now, you'll make your form ready for change.

If the number or names of the car parts you want to show changes, you don't want to have to come back to the form again. You want your form to update automatically.

The screenshot below shows your original Front of Vehicle popup: you defined the choices of the Car part drop-down in the source code. If you leave it as it is, you would need to modify the code whenever the list of car parts changes.

The current optionalElementDropdown control in your form: the choices come from the source code itself

Figure 66. The current optionalElementDropdown control in your form: the choices come from the source code itself


The second screenshot shows what happens when you link the choices to a reference table, and some new records are added to the reference table. A server-side workflow script triggered by a mobile form submission, a webform submission, or an incoming integration message, as well as a human administrator at Rocky Jupiter can modify the list of car parts, and the choices displayed in the form will change accordingly.

The optionalElementDropdown control with choices that come from a reference table

Figure 67. The optionalElementDropdown control with choices that come from a reference table


You don't even have to know about the whole thing; data binding does it for you.