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 (...)
Articles
formulaire_charger
Modifies the table of values returned by the
charger
function for a CVT formPassing 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 (...)
formulaire_verifier
Modifies the array returned by the
verifier
function for a CVT formediter_contenu_objet
Modifies the HTML content of forms
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. (...)
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 (...)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 (...)
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 (...)
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 (...)