You can specify the values that display in drop-down fields on forms such as the registration and change user forms by adding #OPTION tags to your forms. There are several fields that can be used as the value for the #OPTION tag's "name" parameter. Some derive their values from the CustomDropDown table and some do not.
Values Derived from the CustomDropDownTable
Five of these #OPTION values are derived from the default Group Name values found in the CustomDropDown table, and they pull their dropdown values from that table:
- Departments (Group Name = Department)
- IDTypes (Group Name = IDType)
- AltIDTypes (Group Name = AltIDType)
- Statuses (Group Name = Status)
- States (Group Name = State)
For example, if you want to include a drop-down list of all the states within your form, add the following code to your form. Note the value of the #OPTION tag's "name" parameter is States.
<label for="State"> <span class="field"> <span class="req">*</span> <span class="<#ERROR name="ERRORState">"><b>Primary Address State</b></span> </span> <select id="State" name="State" size="1" class="f-name" tabindex="85"> <option>Choose a State</option> <#OPTION name="States" default="VA"> </select> <br /> </label>
Values Not Derived from the CustomDropDownTable
The remaining #OPTION values available in the web forms do not use the CustomDropDown table:
- RequestType: Copy/Loan
- ResearcherUsernames: Names of the researchers the patron proxies for
- Activities: The Activities the patron is associated with
- RequestLinks: Both ResearcherUsernames and Activities
- Formats: From BillingDefaults.BillingType where context = "Format"
- ShippingOptions: From BillingDefaults.BillingType where context = "Shipping Option"
- ServiceLevels: From BillingDefaults.BillingType where context = "Service Level"
- Countries: The <#OPTION name="Countries"> option has changed slightly. You can now specify the format of the value of the dropdowns that's submitted by using the mode parameter, for example <#OPTION name="Countries" mode="twoLetter">. The values for mode are "twoLetter" (the default), "threeLetter", "numeric" (ISO numeric code), and "name", which is just the full name.
For example, if you want patrons to select from a list of associated researchers, add the following code to your form:
<label for="ResearcherUsernames"> <span class="field"> <span class="req">*</span> <span class="<#ERROR name="ERRORResearcherUsernames">"><b>Associated Researchers</b></span> </span> <select id="ResearcherUsernames" name="ResearcherUsernames" size="1" class="f-name" tabindex="85"> <option>Select a Researcher</option> <#OPTION name="ResearcherUsernames"> </select> <br /> </label>