You can build forms consisting of different fields in the Form Builder.
To learn how to get, create, and delete form submissions by using the PHP API, see Form API.
To have multiple instances of the same form on one page, create several identical form blocks. Otherwise, you may encounter issues with submitting data from all forms at the same time.
Existing Form fields¶
The Captcha Form field is based on Gregwar/CaptchaBundle.
You can customize the field by adding configuration to
1 2 3 4 5
The example configuration above resizes the Captcha image (line 3), changes the error message (line 4), and enables the user to reload the code (line 5).
For information about available options, see Gregwar/CaptchaBundle's documentation.
If your installation uses Varnish to manage content cache, you must modify the configuration to avoid issues with the Captcha field. For more information, see Ensure proper captcha behavior.
Form submission purging¶
You can purge all submissions of a given form.
To do this, run the following command, where
form-id stands for Content ID
of the form for which you want to purge data:
The following table lists some of the available options and their meaning:
||Passes a language code, for example, "eng-GB".|
||Passes a repository username. By default it is "admin".|
||Passes a number of URLs to check in a single iteration. Set it to avoid using too much memory. By default it is set to 50.|
||Passes a SiteAccess to use for operations. If not provided, the default SiteAccess is used.|
You can use Forms to enable the user to upload files.
The default Location for files uploaded in this way is
You can change it with the following configuration:
1 2 3 4 5
This applies only if no specific Location is defined in the Form itself.