Forms
Sections
HTML structure
Forms are stored in the formulaires/ directory. A special HTML syntax allows easy customisation and reuse of forms.
Forms
SPIP provides a simple and powerful process to manage forms, called CVT (Charger, Vérifier, Traiter i.e. Load, Verify, Process). It breaks down a (…)
Articles
Explaining input fields
It is often necessary to provide an explanation so that the user knows how to correctly fill out particular fields in a form. SPIP offers 2 (…)
formulaire_charger
Modifies the table of values returned by the
chargerfunction for a CVT formExecuting the processes
Whenever the verification function doesn’t return an error, the form then moves on to the traiter() (processing) function. It is in this function (…)
Calculating the day-of-the-year
This short example makes it possible to calculate and display the day of the year for a date entered on a form.
This form will be named (…)Handling errors returned
The verifier() function of the form can return errors if the submitted field contents are not correct; which we will see in more detail later. To (…)
formulaire_verifier
Modifies the array returned by the
verifierfunction for a CVT formRadio and checkbox fields
To display element lists of radio or checkbox controls, the syntax provided for wrapping the elements uses a . This formatting makes it possible (…)
Translate anything
This simple example will create a small form that calls an external translation service to translate the content entered on that form. The result (…)
editer_contenu_objet
Modifies the HTML content of forms
Field separation using fieldset
When a form contains a large number of fields, they are generally broken up into various blocks, each known as a fieldset in HTML.
Such blocks (…)