Contao Open Source CMS > Understand > User's guide > Managing content > How to manage forms in Contao

How to manage forms in Contao

The built-in form generator can be used to create interactive forms that are sent via e-mail or stored in the Contao database. Uploaded files can be sent as e-mail attachment or stored in the Contao files directory. The form generator supports four different data formats:

FormatDescription
Raw dataThe form data will be sent as plain text message with each field in a new line.
XML fileThe form data will be attached to the e-mail as an XML file.
CSV fileThe form data will be attached to the e-mail as a CSV file.
E-mailIgnores all fields except email, subject, message and cc (carbon copy) and sends the
form data like it had been sent from a mail client. File uploads are allowed.

Form fields

Similar to content elements, Contao provides a separate element for each type of form field like text fields, password fields, select menus, file uploads, hidden fields or submit buttons. Here is an overview of the Contao core form fields:

FieldCSS classDescription
HeadlineheadlineA custom field to insert a section headline.
ExplanationexplanationA custom field to insert an explanation text.
HTML code-A custom field to insert HTML code.
Text fieldtextA single-line input field for a short or medium text.
Password fieldpasswordA single-line input field for a password.
TextareatextareaA multi-line input field for a medium or long text.
Select menuselect/multiselectA single- or multi-line drop-down menu.
Radio button menuradioA list of multiple options from which one can be selected.
Checkbox menucheckboxA list of multiple options from which any can be selected.
File uploaduploadA single-line input field to upload a local file to the server.
Hidden field-A single-line input field that is not visible in the form.
Security questioncaptchaA simple math question to protect against spam bots (CAPTCHA).
Submit fieldsubmitA button to submit the form.

Add a comment