Text Based Fields with Examples
Textfields are used to for basic sorts of information. See below for all possible types of text fields.
NOTE: See the Symfony Forms documentation for an always up-to-date list of field types and their options.
Standard Text Field¶
Textarea Field¶
Email Field¶
This renders an <input type="email">
form element.
Integer Field¶
This renders an <input type="number">
form element.
Money Field¶
This renders a number form element with a currency symbol before the input. Any ISO 3-Letter Currency code is supported.
Password Field¶
This renders am HTML password input.
Percent Field¶
This renders an HTML number input and converts the inputted percentage to a decimal value. It also adds a percentage sign after the form input.
Search Field¶
This renders an HTML search input <input type="search" />
.
URL Field¶
This renders an HTML URL input <input type="url" />
.
Range Field¶
This renders an HTML URL range input <input type="range" />
.
Note that by default the range has no UI to show the actual selected value,
this is normally accomplished by listening to the input
event on the range
field and using javascript to update another element with the value.