Field types
PimKit Forms ships with the field types below. Editors pick them from the palette on the Build tab and set their options in the panel on the right. Developers can add their own types (see the end of this page).
Built-in types
Section titled “Built-in types”| Type | Stored value | Options | Notes |
|---|---|---|---|
text |
string or null | minLength, maxLength (255), pattern |
Pattern must match the whole value, written without delimiters |
textarea |
string or null | rows (4), maxLength (5000) |
Line breaks kept as \n |
email |
string or null | checkMx |
HTML5 email check, max 190. Domain lowercased |
number |
int, float or null | min, max, step |
Accepts 1,5. Step counts from min (or 0) |
select |
string, or list of strings when multiple |
choices, multiple, choicesSource |
Choices can come from data objects, see below |
checkbox |
bool | requiredTrue |
Required means it must be ticked |
consent |
{accepted, text, privacyDocumentId} |
textRichText, privacyDocumentId, requiredTrue (true) |
Snapshot of the text shown |
hidden |
string or null | defaultFrom (static, query, header, cookie) |
resolveDefault() for the renderer |
phone |
string, E.164 when the country is known | defaultCountry (ISO code) |
+49…, 0049… and national numbers with a default country become +49301234567. 6 to 15 digits |
date |
YYYY-MM-DD or null |
min, max |
Shown as 15.01.2027 in German emails |
radio |
string or null | choices, choicesSource |
Exactly one choice |
checkbox_group |
list of strings | choices, choicesSource, minSelected, maxSelected |
|
file |
list of {name, size, mime} |
maxFiles (1), maxSizeMb (10), allowedMime[] |
Files go to protected storage, see below |
html |
none | content (text per language) |
Sanitised when rendered: links, bold, italic, paragraphs, lists of safe tags only |
heading |
none | level (2 to 6) |
The text is the field’s label |
separator |
none | none | A line between fields |
step |
none | none | Starts the next step of a multi-step form. The label is the step title |
Choices from data objects
Section titled “Choices from data objects”select, radio and checkbox_group can take their choices from Pimcore data objects instead of a fixed list:
"options": {"choicesSource": {"type": "data_object", "classId": "Product", "labelField": "name"}}Published objects of the class (id or name) become the choices: the value is the object id, the label is labelField in the form’s language (or the object key). At most 500 objects, sorted by label.
Uploaded files
Section titled “Uploaded files”- Files are stored in the Flysystem storage
pimkit_forms.storage, by defaultvar/pimkit/forms-files, outside the public folder. Point it to S3 or similar with your ownflysystemconfig for that storage name. - Paths:
<year>/<month>/<submission uuid>/<random>-<name>. Each file has a row inpimkit_form_submission_file. - Virus check: alias
PimKit\FormsBundle\Submission\FileScannerInterfaceto your own scanner. The default lets everything through. - The
emailaction attaches the files (up to 15 MB in total) unlessattachFilesis false. - After a failed no-JS submit the visitor has to choose the files again (browsers never refill file inputs).
Custom field types (developers)
Section titled “Custom field types (developers)”Every field type is a service implementing PimKit\FormsBundle\Field\FieldTypeInterface. Implementing the interface tags it pimkit_forms.field_type automatically. A type registered later under the same name replaces a built-in one. Besides the methods below, getGroup() places it in the palette and hasValue() is false for display-only types.
getOptionsSchema()is JSON Schema.DefinitionValidatorchecks each field’soptionsagainst it (paths likefields/2/options/choices/0/value), and the Studio settings panel renders it withJsonSchemaForm.buildConstraints($field)returns Symfony constraints for the raw value. Required comes fromvalidation.required, which the submission handler sets from the evaluated conditions.- Type limits are read from
optionsfirst, then fromvalidation(older definitions keepmaxLengththere). normalize()turns the raw value into what is stored.toDisplayString()is used in emails, exports and lists.- Validation messages use keys in
translations/validators.{en,de}.yaml. Studio labels arepimkit.forms.field-type.<type>andpimkit.forms.field-group.<group>. - To extend a built-in type, extend
AbstractTextType,AbstractChoiceTypeorAbstractCheckboxType(the concrete classes are final).