Reference - System form components

This page lists all components that are available for the form builder by default in new installations of Kentico.

Identifiers of system form components

You can access the identifiers of system form components in your code via the IDENTIFIER constant exposed by each form component class. For example, the identifier is required when using the EditingComponent attribute to set the editing interface for a property.

Form component Form component class Type Description
Checkbox CheckBoxComponent bool Checkbox field that saves a boolean value (true for a selected checkbox, false for a cleared checkbox).
Consent agreement ConsentAgreementComponent GUID

Checkbox field that allows users to give agreements to with a pre-selected consent. Displays the selected consent's short text next to the checkbox. When a visitor selects the consent checkbox and submits the form, the system creates a corresponding consent agreement for the given contact and stores the agreement's identifier (GUID) into the form field.

To learn more, see: Working with consents on MVC sites

Email EmailInputComponent string Input field for entering one or more email addresses.
Drop-down list DropDownComponent string Drop-down selector offering multiple options. Only one option can be selected.
Numeric input IntInputComponent int Textbox input field for entering whole numbers.
Radio buttons RadioButtonsComponent string Selector offering multiple options in the form of radio buttons. Only one option can be selected.

reCAPTCHA

_________________

RecaptchaComponent string

A validation element based on reCAPTCHA, which allows forms to tell apart humans and computers. If the reCAPTCHA validation fails, the form cannot be submitted.

Requires users to click a checkbox indicating they are not a robot. This either passes the user immediately or challenges them to validate whether or not they are human (using an additional image selection or audio test).

To learn how to set up the reCAPTCHA component for your site, see: Configuring reCAPTCHA

Text area TextAreaComponent string

Input field that allows users to enter text into an area with an adjustable size.

Text input TextInputComponent string Textbox input field.
U.S. phone number USPhoneComponent string

Input field for a phone number in the standard US format, i.e. (132) 456-7890.

Configuring reCAPTCHA

You need to register your site to use the reCAPTCHA API and obtain a pair of API keys:

  1. Go to https://www.google.com/recaptcha/admin and sign in with your Google account.
  2. Select the reCAPTCHA v2 type (other reCAPTCHA types are not supported by default).
  3. Fill in all required details, including the domain where your site is running (the presentation domain of your MVC live site).
  4. Copy your Site key and Secret key.

Next, enter your site's reCAPTCHA API keys into Kentico:

  1. Open the Settings application in the administration interface.
  2. Navigate to the Security & Membership -> Protection settings category.
  3. Under CAPTCHA settings, paste the API keys into the reCAPTCHA site key and reCAPTCHA secret key settings respectively.
  4. Save the settings.

    Tip: If you run multiple sites in your Kentico instance, you can switch between them using the Site selector and enter different API keys for each site.

With the API keys entered into the system, the reCAPTCHA form component now works in forms. When composing forms, the form builder interface allows users to configure additional properties for specific reCAPTCHA fields:

  • Theme – sets the appearance of the reCAPTCHA element (Light or Dark).
  • Size – sets the size of the reCAPTCHA element (Normal or Compact).
  • Type – sets the type of challenge used if the initial noCAPTCHA validation fails (Image or Audio).

Using multiple reCAPTCHAs on the same page

The system does not support the use of multiple reCAPTCHA fields within the same form. You can have multiple different forms with a reCAPTCHA field on the same page.


Was this page helpful?