About this article
A dropdown form field is a type of form field that gives you a limited and specific number of options dictated by a data source. The name is derived from the dialogue "dropping down" and presenting options. The options are presented as part of the document creation dialogue or document update dialogue. Below is an example of the result for an end-user.
Prerequisites
|
Creating a dropdown form field
In it's simplest form a dropdown consists of a name, label, datasource, and label column. The name is used for reference in the binding syntax, the label is used for the end-user and appears above the dropdown, the data source contains the options and the label column defines the column which appears in the dropdown. Therefore the simplest dropdown creation consists of the following steps:
- If not already existing, create a data source in the Resource tab in the Admin Center with the desired schema, keep in mind you might want to have a label column that is different from the data you'd like to reference in bindings. A simple format would be to use the
Name
column for labeling and other columns for data. - Populate the rows of the data source with data you'd like to reference in templates
- Go to the
Form
tab in Dynamics Designer - Click
Add form field
- Select Type
Dropdown
, fill inName
andLabel
fields, and set the desired options - In
Datasource
select the data source the form should be linked to - In
Label column
select the column in the data source that should be displayed to the end-user - Click
Save
Below is an example of the above.
Additional Options
- Required - Check this box if you'd like to mandate the user select an option, an asterisk will indicate to them that it's required
- Default Value - Prepopulate an option for the user
- Filter by - Filter the options of this dropdown according to a data source
- Hide if no interaction - The dropdown becomes hidden if no action is required by the user. This is common in conjunction with filtering.
- Auto-select first option - Check this box to auto-select the first option, otherwise no option is selected by default.
- Spacing before - Add space above the form field
- Spacing after - Add space below the form field
- Helptext prefix - Add help text above the dropdown, this can be useful for guiding the user on filling out the form field
- Helptext postfix - Add help text below the dropdown, this can be useful for guiding the user on filling out the form field
- Share value - Allow the form field to be recognizable as shared by dynamic documents
Example 1
Create a dropdown for the user to select the state of the document for use in a document property. First create a data source that has a name column with the state options.
Secondly, create the dropdown.
The user will now be presented with the options upon document creation or update.
The binding {{Form.DocumentState.Name}}
can now be used in the document property.
Comments
0 comments
Article is closed for comments.