Adding Bindings to Database Fields
- Last UpdatedNov 06, 2023
- 2 minute read
This topic is related to Supplementary forms.
Linked Work Permit fields
A supplementary form can have multiple linked work permits. You can link specific fields in the work permits to fields in the Supplementary Form schema, so that these fields are auto-populated in the form.
The Field bindings for supplementary forms can be used to auto-populate information of form and its linked entities.
For example: A list of work permits linked to form, so it will be easy for users to be able to print all references documents with the form and keep track of linked entities list in the form itself.
Add bindings to database fields
There are two primary types of bindings that can be used with different types of HTML5 form elements.
-
Read only text
-
Form element with value (input type text)
Read-only elements
You can use elements such as DIV, SPAN, P, and so on, to display read-only text.
The recommended element is DIV, unless there is specific style defined in the form.
You can place these elements anywhere in the Supplementary Form schema and it will display as designed using CSS styles and layout positions.
An example for DIV element to show data for the Supplementary form number.

Text input elements
Text inputs can be used to bind data from the database, but should not be editable. It is important to add a readonly attribute for input elements to bind data.
An example of binding for a text input element.

Note: It is important to add the readonly attribute for input elements, so that users don’t edit the content and the field always display data from the OSM application.
Example of Bindings
This is an example of bindings in the HTML5 schema of a Supplementary Form. For a list of bindings, see Field bindings for supplementary forms.
