The <#OPTION> web tag was configured in Aeon v5.1 to handle auto-generating a list of checkbox options for a group defined in the CustomDropDown Table. This makes it possible to offer a range of options to the user to select on your web forms without having to hardcode each option into the code for the page.
This tag is used by first specifying a Group Name defined in the CustomDropDown Table in two required attributes, selectedValue and fieldName, within the tag. A name attribute with the value "Custom" and a type attribute with the value "checkbox" must also be written into the tag.
After a group name is specified, a list of checkbox options will generate and display on the web page based on the Label Name for each individual value that is configured for that group in the CustomDropDown Table. If one of these options is selected by the user, then the Label Value configured for that option will be stored in the field upon submission of the form. An additional "Other" text box can be configured to display below the checkbox options by setting the includeOther attribute to "True" and will allow the user to enter a custom value.
Multiple checkbox options can be selected and will be stored as text in that field in the database. These values will be separated by the delimiter specified by the delimiter attribute in the tag, or with a comma by default if no delimiter is configured.
In the following example, the ResearchTopics field will be configured to display as a list of specific options the user can select rather than as an open text field.
Step One: CustomDropDown Table
First, a group for this field containing several different options must be configured in the CustomDropDown Table:
|Group Name||Label Name||Label Value|
Step Two: Web Page Code
After the options are configured in the CustomDropDownTable, the <#OPTION> tag should be added underneath the label for the field in the code for the web form:
<div class="form-group col-md-4">
<span class="<#ERROR name='ERRORResearchTopics'>">
fieldName="ResearchTopics" type="checkbox" delimiter=" "
- name - "Custom"
- selectedValue - '<#PARAM name='[GroupName]'>'.
- fieldName - The name of the group in the CustomDropDown Table the checkboxes options are associated with.
- type - "checkbox"
- delimiter - This can be any character that you want to separate your values in the database. (optional - will default to ','). In the example above, the delimiter is a single space.
- includeOther - Determines if an 'Other' text box should appear after the list of checkboxes. Default value: False. Can also be set to True.
- otherLabel - Label displayed with the 'Other' text box, if it exists. Default value: 'Other'.
After configuration, the Research Topics field will now display individual checkbox options according to the Label Name for each value configured in the CustomDropDown Table:
Upon submitting the form, these values will be saved and appear in the Staff Client according to the Label Value for each option in the CustomDropDown Table. Multiple values will be separated by the delimiter value in the tag (in this case, configured to be a blank space). The value entered in the "Other" text box will also be saved in the field: