Text Field Component

Submitter types information (e.g. name or email).

On this page:

Last reviewed: May 31, 2022

The UBCMS is not an appropriate place for ANY regulated private data, such as bank credit/debit card numbers, government-issued ID numbers, health information or computer passwords.

Want to start your form with preloaded values? See Use Parameters.

Note: all form field names must be unique

For example, if you build your form by copying a component (e.g. to add a second Text Field), be sure to change the ID.

Using This Component

Add the component to the page between the Start of Form and End of Form sections of the Form Container component. There are four tabs: Title and Text, Initial Values, Constraints, and Size.

Click the wrench icon to configure these settings.

Technical Restrictions

  1. This component must be placed between the Start of Form and End of Form sections of the Form Container component.
  2. The UBCMS is not an appropriate place for ANY regulated private data, such as bank credit/debit card numbers, government-issued ID numbers, health information or computer passwords.
  3. We discourage building forms in shared content -- this practice may interfere with normal functionality, such as validation.

Configure - Main Settings

Title and Text Tab

Element Name: Specify the ID to be associated with this field when the data is stored or emailed. Required.

  • The ID must start with a letter, and can include only letters, numbers, underscores and hyphens.
  • The ID is not visible to the public.

Title: This is the descriptive label your visitor will see on the page.

Hint: Provide assistance for people completing the form. Appears in paler italics below the associated field.

Property is multi value: When selected, a small "+" is added to the field so that the visitor can add multiple separate values.   

Only show value - When this is selected, the field only displays a preset 'default value' or a value sent to the page through 'Use parameters'. This information will be displayed to the page visitor and also collected onc ethe form is submitted, but the visitor will not be able to change it.

Initial Values Tab

Default value: Stipulate a default value that will be displayed on the form and used unless the visitor makes a different selection.

Use parameters: Select if desired. Developers only!

  • Allows authors to preload this form value from the URL that loaded the form. 
  • e.g. If the field name is 'myfield' and the page URL is '…/form.html?myfield=123' then the default value of the field when the form is first loaded would be "123."
  • This can be useful to solve a variety of things, such as a contact form that is preloaded with a different 'To' address depending on which link was first clicked. While the initial destination would be pre-selected, the visitor could see that choice and adjust as necessary.

Contraints Tab

This tab controls whether completion of this field is required and what constraints are being enforced (for example, must be a phone number). May also be used to customize form error messages.

Required: Completion of this field is mandatory before submission of the form is permitted.

Required Message: Insert a custom message to be displayed if the submitter neglects to complete this field.

Constraint: choose from the following:

  • None (default)
  • Email: Validates if the field contains an email address (a@b.c).
  • Event Basics Constraint: Validates if the field contains a title and valid date.
  • Link spam filter: Disallows basic link spam (rejects HTML that appears to be embedded links).
  • Month (numeric): Requires a month as a number (01-12).
  • Name (no umlauts): Requires letters (some additional characters are allowed, like a period or hyphen).
  • Numeric: Requires numbers.
  • UB Email: Requires a valid UB email address (something@buffalo.edu). 
  • US Date: Requires a valid date, in US format (i.e. month day year). Acceptabled formats:
    • MM-dd-yyyy'T'HH🇲🇲ss.SSSZ    (like 12-21-2009T14:45:00.000+01:00)
    • MM-dd-yyyy'T'HH🇲🇲ss    (like 12-21-2009T14:45:00)
    • MM-dd-yyyy    (like 12-21-2009)
    • MM/dd/yyyy HH🇲🇲ss    (like 12/21/2009 14:45:00)
    • MM/dd/yyyy    (like 12/21/2009)
  • Year: Requires a valid year number.

CIT privacy policy preclude the request for credit card information in the UBCMS. Please ignore the Luhn Algorithm Validator and the second Year ("Requires a CCV) constraint settings.

Constraint Message: Insert a custom message to be displayed if the submitter fails to successfully complete this field based on the above constraint.

Size Tab

Size: Set the prefered displayed size in columns and rows.

Width: Set a maximum display size in pixels.

See an Example

 
(this is a live example)

Was This Information Helpful?

(Required)
(Required)
(so we can thank you or request more details)
(Required)
(buffalo.edu addresses only please)
(Required)