1. The Form elements

The basic elements

Version:

Frequently used elements for forms, such as Text, Email, and Telephone, are grouped in the Basic section of the Form elements pane. You can drag these elements from the General tab on the Form elements pane onto the form canvas, where they become form fields, which you can edit.

Text

Use the Text element to add a text field to your form. You can use this element for the title of your form to state its purpose. For example, Careers inquiry form, or Contact us.

SectionItemDescription
DetailsTextText that appears in, for example, the title of your form when you add the text element.
Field nameName of the element.
Html tagSelect an HTML tag for the text. To add tags, go to sitecore/System/Settings/Forms/Meta Data/Text Tags
StylingCSS classDefines the CSS class of the field.

Number

Use the Number element to add a field to enter numerals.

SectionItemDescription
DetailsLabelCaption that tells your contacts what information a particular form field is asking for.
Field nameName 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.
Default valueInitial value.
Placeholder textText in a form field that functions as a hint to describe the expected value. The placeholder text disappears when the contact clicks the field. For example, Enter your first name here.
Min valueDetermines the minimum value. Contacts see a validation error message if their input is lower than the value specified in this field.
Max valueDetermines the maximum value. Contacts see a validation error message if their input is higher than the value specified in this field.
StepSpecifies the number intervals, for example, if you want the contact to fill in even numbers only. The default value is 1.
ValidationField validationDetermines whether field validation is applied.
Field importanceIndicates whether the visitor must fill in the field. The options are Optional or Mandatory.
StylingCSS classDefines the CSS class of the field.
CSS class for labelDefines the CSS class of the label.
Advanced settingsAllow saveEnables or disables saving the filled-in field data upon form submission.

Single-line text

Use the Single-line text element to add a field to enter one line of text. For example, for name entry fields.

SectionItemDescription
DetailsLabelCaption that tells your contacts what information a particular form field is asking for.
Field nameName of the element.
Default valueInitial value.
Placeholder textText in a form field that functions as a hint to describe the expected value. The placeholder text disappears when the contact clicks the field. For example, Enter your first name here,
Minimum text lengthDetermines the minimum text length for the input field of the Single-line text element. Contacts see a validation error message if their input is shorter than the number of characters specified in this field.
Maximum text lengthDetermines the maximum text length for the input field of the Single-line text element. Contacts see a validation error message if their input is longer than the number of characters specified in this field.
ValidationField validationDetermines whether field validation is applied.
Field importanceIndicates whether the contact must fill in the field. The options are Optional or Mandatory.
StylingCSS classDefine the CSS class of the field.
CSS class for labelDefine the CSS class of the label.
Advanced settingsAllow saveEnables or disables saving the filled-in field data upon form submission.

Multiple-line text

Use the Multiple-line text element to add a field to enter multiple lines of text. You can use this element for addresses and other long answers, such as comments and descriptions.

SectionItemDescription
DetailsLabelCaption that tells your contacts what information a particular form field is asking for.
Field nameName of the element.
Default valueInitial value.
Placeholder textText in a form field that functions as a hint to describe the expected value. The placeholder text disappears when the contact clicks the field. For example, Enter your first name here.
Number of rowsDetermines the number of lines available.
Minimum text lengthDetermines the minimum text length for the input field of the Multiple-line text element. Contacts see a validation error message if their input is shorter than the number of characters specified in this field.
Maximum text lengthDetermines the maximum text length for the input field of the Multiple-line text element. Contacts see a validation error message if their input is longer than the number of characters specified in this field.
ValidationField validationDetermines whether field validation is applied.
Field importanceIndicates whether the contact must fill in the field. The options are Optional or Mandatory.
StylingCSS classDefines the CSS class of the field.
CSS class for labelDefines the CSS class of the label.
Advanced settingsAllow saveEnables or disables saving the filled-in field data upon form submission.

Email

Use the Email element to add a field to enter an email address.

SectionItemDescription
DetailsLabelCaption that tells your contacts what information a particular form field is asking for.
Field nameName of the element.
Default valueInitial value.
Placeholder textText in a form field that functions as a hint to describe the expected value. The placeholder text disappears when the contact clicks the field. For example, Enter your first name here,
Minimum text lengthDetermines the minimum text length for the input field of the Email element. Contacts see a validation error message if their input is shorter than the number of characters specified in this field.
Maximum text lengthDetermines the maximum text length for the input field of the Email element. Contacts see a validation error message if their input is longer than the number of characters specified in this field.
ValidationField validationDetermines whether field validation is applied. The options are Email Validator or String Length Validator.
Field importanceIndicates whether the contact must fill in the field. The options are Optional or Mandatory.
StylingCSS classDefines the CSS class of the field.
CSS class for labelDefines the CSS class of the label.
Advanced settingsAllow saveEnables or disables saving the filled-in field data upon form submission.

Telephone

Use the Telephone element to add a field to enter a telephone number.

SectionItemDescription
DetailsLabelCaption that tells your contacts what information a particular form field is asking for.
Field nameName of the element.
Default valueInitial value.
Placeholder textText in a form field that functions as a hint to describe the expected value. The placeholder text disappears when the contact clicks the field. For example, Enter your first name here,
Minimum text lengthDetermines the minimum text length. Contacts see a validation error message if their input is shorter than the number of characters specified in this field.
Maximum text lengthDetermines the maximum text length. Contacts see a validation error message if their input is longer than the number of characters specified in this field.
ValidationField validationDetermines whether field validation is applied. The options are Phone Number Validator or String Length Validator.
Field importanceIndicates whether the contact must fill in the field. The options are Optional or Mandatory.
StylingCSS classDefines the CSS class of the field.
CSS class for labelDefines the CSS class of the label.
Advanced settingsAllow saveEnables or disables saving the filled-in field data upon form submission.

Checkbox

Use the Checkbox element to display a check box that enables users to toggle and select the options.

SectionItemDescription
DetailsLabelCaption that tells your contacts what information a particular form field is asking for.
Field nameName of the element.
CheckedDetermines the check box value that is preselected by default.
ValidationField importanceIndicates whether the contact must fill in the field. The options are Optional or Mandatory.
StylingCSS classDefines the CSS class of the field.
CSS class for labelDefines the CSS class of the label.
Advanced settingsAllow saveEnables or disables saving the filled-in field data upon form submission.

Date

Use the Date element to add a field to enter a date.

SectionItemDescription
DetailsLabelCaption that tells your contacts what information a particular form field is asking for.
Field nameName of the element.
Selected dateSpecifies the date selected by default.
Start dateSpecifies the date range start date.
End dateSpecifies the date range end date.
ValidationField importanceIndicates whether the contact must fill in the field. The options are Optional or Mandatory.
StylingCSS classDefines the CSS class of the field.
CSS class for labelDefines the CSS class of the label.
Advanced settingsAllow saveEnables or disables saving the filled-in field data upon form submission.
Note

Sitecore Forms renders the date field using the HTML5 element. This element is not supported in the IE11 and Mac OS Safari browsers. To get the date field with the datetime picker element in these browsers, consider implementing a custom element.

If you have suggestions for improving this article, let us know!