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
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 (…)Displaying the form
A file formulaires/joli.html is called from a template file using the syntax #FORMULAIRE_JOLI, which then calls and displays the form.
The HTML (…)Executing 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 (…)
editer_contenu_objet
Modifies the HTML content of forms
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 (…)
formulaire_verifier
Modifies the array returned by the
verifierfunction for a CVT formExplaining 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 (…)
Radio 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 (…)
Passing arguments to the CVT functions
The charger(), verifier() and traiter() functions do not receive any parameters by default. php function formulaires_x_charger_dist()… function (…)
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 (…)