Adding Web Tags for Generating Custom Checkbox Groups

Print Friendly and PDF Follow

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 feature may be used with any of the default Aeon fields that have been configured in the CustomDropDown Table except for the UserInfo, ItemInfo, and ActivityInfo fields. User-defined custom fields are also unsupported. 

Configuration

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.

The combined character length of the options selected and the delimiter value cannot exceed the character limit for that field in the database.

Code Example

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
ResearchTopics Kung Fu KungFu
ResearchTopics History History
ResearchTopics Art Art

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">
<label for="ResearchTopics">
<span class="<#ERROR name='ERRORResearchTopics'>">
Research Topics
<span class="req">(required)</span>
</span>
</label>
<#OPTION name="Custom"
selectedValue="<#PARAM name='ResearchTopics'>"
fieldName="ResearchTopics" type="checkbox" delimiter=" "
includeOther="true" otherLabel="Other">
</div>
The attributes in the code above are broken down as follows:
 
  • Required:
    • name - "Custom"
    • selectedValue - '<#PARAM name='[GroupName]'>'.
    • fieldName - The name of the group in the CustomDropDown Table the checkboxes options are associated with.
    • type - "checkbox"
  • Optional:
    • 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'.

Results

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:

Checkboxes_on_the_web.png

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:

Values_in_Client.png

Questions?

If this article didn’t resolve your issue, please contact Atlas Support for assistance:

Contact Support