The list elements
Many forms use lists to gather data. The Forms application contains default list elements for drop-down lists, list boxes, check boxes, and radio button lists. A list item can connect to existing data, or it can display a fixed value that you enter when you create the item.
When you add a new list element to your forms, the default behavior is that the values for the items are the same as the labels. If you select Customized in the values field, this allows you to enter custom values that are different to the labels. If you do this, make sure that you specify both a label and a value, otherwise the value isn’t saved to the database when a customer selects an option from the list.
This topic describes the list elements and their settings.
Dropdown list
Use the Dropdown list element to display a list of options where a contact can only select one of the options.
Section |
Item |
Description |
---|---|---|
Details |
Label |
Caption that tells contacts what information a particular form field is asking for. |
Field name |
Name of the element. Always use meaningful names for the Field name. The Field name is the actual Item name for the Sitecore definition item for the form field. | |
List items |
Static or Dynamic |
Determines whether the list items connect to existing data or to a fixed value. |
Select datasource |
Click Browse (...) to select a data source. In the Select a data source for the control dialog box, navigate to the item on your website that contains the subitems corresponding to the field values that you want to display. Select the relevant item, and then click Select. | |
Drop list item 1 label |
Specifies the first drop list item. | |
Drop list item values |
Determines the value that is saved to the database. The options are Same as label or Customized. | |
Value |
Sets the list box value that you want to save in the database when you select Customized in the Drop list box item values field. | |
Default chosen list item |
The list item that is preselected by default. | |
Empty list item at top of list |
Indicates whether the list starts with an empty line. The options are Yes or No. | |
Validation |
Field importance |
Indicates whether the visitor must fill in the field. The options are Optional or Mandatory. |
Styling |
CSS class |
Defines the CSS class of the field. |
CSS class for label |
Defines the CSS class of the label. | |
Advanced settings |
Allow save |
Enables or disables saving the filled-in field data upon form submission. |
List box
Use the List box element to display a list of options where a contact can select any number of choices, including zero, one, or several.
Section |
Item |
Description |
---|---|---|
Details |
Label |
Caption that tells contacts what information a particular form field is asking for. |
Field name |
Name of the element. | |
List items |
Static or Dynamic |
Determines whether the list items connect to existing data or to a fixed value. |
Select datasource |
Click Browse (...) to select a data source. In the Select a data source for the control dialog box, navigate to the item on your website that contains the subitems corresponding to the field values that you want to display. Select the relevant item, and then click Select. | |
List box item item 1 label |
The value of the first list box item. | |
List box item values |
Determines the value that is saved to the database. The options are Same as labels or Customized. For example, when you use different language versions of your form, you can decide to save the original language values to the database. | |
Value |
Sets the list box value that you want to save in the database when you select Customized in the List box item values field. | |
Default chosen list item |
The list item that is preselected by default. | |
Selection Mode |
Indicates whether only a single item or multiple items can be selected from the list at one time. The options are Single or Multiple. | |
Rows |
The number of rows. | |
Validation |
Field importance |
Indicates whether the contact must fill in the field. The options are Optional or Mandatory. |
Styling |
CSS class |
Defines the CSS class of the field. |
CSS class for label |
Defines the CSS class of the label. | |
Advanced settings |
Allow save |
Enables or disables saving the filled-in field data upon form submission. |
Checkbox list
Use the Checkbox list element to display a list of options where the contact can select any number of choices, including zero, one, or several.
Section |
Item |
Description |
---|---|---|
Details |
Label |
Caption that tells contacts what information a particular form field is asking for. |
Field name |
Name of the element. | |
List items |
Static or Dynamic |
Determines whether the list items connect to existing data or to a fixed value. |
Select data source |
Click Browse (...) to select a data source. In the Select a data source for the control dialog box, navigate to the item on your website that contains the subitems corresponding to the field values that you want to display. Select the relevant item, and then click Select. | |
Checkbox 1 label |
The value of the first check box item. | |
Checkbox values |
Determines the value that is saved to the database. The options are Same as labels or Customized. For example, when you use different language versions of your form, you can decide to save the original language values to the database. | |
Value |
Sets the list box value that you want to save in the database when you selected Customized in the Checkbox values field. | |
Selected checkboxes |
The list item that is preselected by default. | |
Validation |
Field importance |
Indicates whether the contact must fill in the field. The options are Optional or Mandatory. |
Styling |
CSS class |
Defines the CSS class of the field. |
CSS class for label |
Defines the CSS class of the label. | |
Advanced settings |
Allow save |
Enables or disables saving the filled-in field data upon form submission. |