Custom DropDown

Follow

You can specify the values that apply to certain drop-down fields on the registration and change user information forms (NewUserRegistration, NewAuthRegistration, and ChangeUserInformation forms). Those values can be set in the CustomDropDown table of the Customization Manager. The Department, State, and Status field values on these pages are in the CustomDropDown table by default, along with the NTVTC value that populates the Delivery Location field in the web (the client value is populated by the DeliveryLocations table).

An example custom drop-down field as displayed in the ChangeUserInformation form:

<label for="Department">
	<span class="field">
		<span class="<#ERROR name="ERRORDepartment">"><b>Department</b></span>
	</span>
	<select id="Department" name="Department" size="1" class="f-name" tabindex=
	"4">
		<#OPTION name="custom" groupname="Department" selectedValue="<#PARAM 
		name=Department>" />
	</select><br />
</label>

Adding Custom DropDown Entries

If you need to add additional entries to your Department or Status dropdowns, simply add them into the CustomDropDown table. The LabelName entry will display on the web pages and the LabelValue entry will display in the client and database record. Additional Delivery entries are also added to the web via the CustomDropDown table; entries in the client must be added via the DeliveryLocation table.

Be sure to stay within the allowed number of characters for the field.

  • Department: nvarchar(255)
  • State: nvarchar(2)
  • Status: nvarchar(15)
  • DeliveryMethod: narchar(25)

Note that when you are creating your entries you should not use the words "Status" or "Department" as possible values for either the Status or Department fields. Using these reserved words as values for those fields in the Users table will cause issues and errors when using Web Reports to build statistical data.

Adding an Optional DropDown Value to a Form Using DefaultName and DefaultValue

In the NewUserRegistration and NewAuthRegistration forms, the drop-down fields described above also include defaultValue and defaultName fields. The defaultValue is the equivalent of the Label Value; the defaultName is the equivalent of the Label Name and is the value that will display on the form. This allows you to add an additional option to your web form for explanatory text, such as "Pick a Department." These values will appear in the Client forms for those users who have selected them. An example:

<label for="Department">
	<span class="field">
	<span class="req">*</span>
		<span class="<#ERROR name="ERRORDepartment">"><b>Department</b></span>
	</span>
	<select id="Department" name="Department" size="1" class="f-name" tabindex=
	"4">
		<#OPTION name="custom" groupname="Department" selectedValue="<#PARAM 
		name=Department>" defaultValue="NONE" defaultName="Pick a department" />
	</select><br />
</label>
  • Name: For custom drop-down field, this must always be set to custom.
  • GroupName: Representsthegroupname entered in the CustomDropDown table's GroupName field.
  • SelectedValue: This represents the value of the option that should be selected by default. This can either be plain text or can be another ILLiad tag that will be replaced when rendered. Example: If you always want the department to display as Art History, and the value for Art History is ARTH, yourselectedValue="ARTH". Alternatively, if you want the department to be set to the user's current department or what they last selected on the form, you would use the selectedValue="<#PARAM name=Department>"
0 out of 0 found this helpful

Comments

0 comments

Article is closed for comments.