Skip to main content

Available Form Types

There are several form types available (updated continuously).

NameGroupDescription
TextText FieldsDefault input text field.
HiddenHidden FieldsA hidden input field.
Text AreaText FieldsDefault textarea field.
IntegerText FieldsHTML5 Number field.
CheckboxOther FieldsDefault (single) checkbox field.
SubmitButtonsSubmit Button.
CountryChoice FieldsCreate a drop down with a default country selection.
ChoiceChoice FieldsCreate a (sortable) drop down, multi drop down, multi-checkboxes, multi-radios, checkout choice meta for enhanced choice customization
Dynamic ChoiceChoice FieldsCreate a drop down, multi drop down, multi-checkboxes, multi-radios. Populate Data from a custom Service.
Html TagOther FieldsCreate a label, or headline element (tags can be defined via parameter)
SnippetOther FieldsPlace a custom (localized) snippet in your form.
Dynamic Multi FileOther FieldsMulti-File Upload field.
DateDate and Time FieldsA field that allows the user to modify date information via a variety of different HTML elements. Now supports usage of text- or html5-datetype
Date TimeDate and Time FieldsThis field type allows the user to modify data that represents a specific date and time (e.g. 1984-06-05 12:15:30).
TimeDate and Time FieldsThis can be rendered as a text field, a series of text fields (e.g. hour, minute, second) or a series of select fields. The underlying data can be stored as a DateTime object, a string, a timestamp or an array.
BirthdayDate and Time FieldsCan be rendered as a single text box, three text boxes (month, day and year), or three select boxes.
reCAPTCHA v3Security FieldsAdd an invisible Spam protection to your form.

Available Container Form Types

There are several container form types available. Read more about the Container Type here.

NameGroupDescription
RepeaterContainerCreate repeatable field collections
FieldsetContainerCreate grouped field blocks

Constraints

NameDescription
NotBlankValidates that a value is not blank - meaning not equal to a blank string, a blank array or null
EmailValidates that a value is a valid email address. The underlying value is cast to a string before being validated.
LengthValidates that a given string length is between some minimum and maximum value.
UrlValidates that a value is a valid URL string.
RegexValidates that a value matches a regular expression.
IP-AddressValidates that a value is a valid IP address.
RangeValidates that a given number is between some minimum and maximum number.
Card SchemeThis constraint ensures that a credit card number is valid for a given credit card company.
BICThis constraint is used to ensure that a value has the proper format of a Business Identifier Code (BIC).
IbanThis constraint is used to ensure that a bank account number has the proper format of an International Bank Account Number (IBAN).
DateValidates that a value is a valid date, meaning either a DateTime object or a string (or an object that can be cast into a string) that follows a valid YYYY-MM-DD format.
DateTimeValidates that a value is a valid "datetime", meaning either a DateTime object or a string (or an object that can be cast into a string) that follows a specific format.
TimeValidates that a value is a valid time, meaning an object implementing DateTimeInterface or a string (or an object that can be cast into a string) that follows a valid HH:MM:SS format.

Enable / Disable Form Types

It's possible to enable or disable specific form types.

Enable specific Elements

Only the hidden Element is available.

form_builder:
admin:
active_elements:
fields:
- 'hidden'

Disable specific Elements

All Fields except the hidden Element are available.

form_builder:
admin:
inactive_elements:
fields:
- 'hidden'

Note: If you're using both config elements at the same time, no field will show up (assuming that you're using the example from above)

Extended Type Configuration

Html Tag Type

To define your custom html tags, add this to your `config/config.yaml':

parameters:
form_builder_html_tag_elements:
- ['h1','h1']
- ['h2','h2']
- ['label','label']
- ['p','p']

Data Injection

If you want to add data to your text fields, based on a specific condition (a query parameter in request for example) you may want to check out form data injectors.