Extension:CIForms/en

CIForms allows rapid creation of forms, either standard forms with input fields aimed at receiving data from visitors, or forms with multiple choice questions or even Cloze tests to administer complex surveys & tests.

All forms include automatic validation, are optionally protected by the latest version of Google recaptcha and have been inspired by this extension at Wikiversity: they diverge from it mainly because the submitted data are stored in the database and can be optionally sent to the provided email address(es), rather than used to compute a score.

Please check Help:Extension:CIForms for detailed examples.

Features

 * forms with input of various format (with placeholders, responsive, mandatory fields, different input types, like 'text', 'email', 'password', 'textarea', 'email', 'tel', etc.)
 * multiple choice questions (with optional inputs within choices)
 * cloze tests with arbitrary number of inputs per line
 * forms can be nested/grouped together (see picture below)
 * native validation and optional captcha verification
 * html and wikitext are both allowed within the forms, therefore allowing the creation of tests with sentences, tables, dialogues, and more! (see here for the related examples)
 * submission groups: sent results are stored within a dedicated table, and they can be retrieved through a special page, and accessed based on the given submission groups (see below for more details)
 * submitted forms can be downloaded as pdf and even sent to the provided email address(es) as attachment
 * all css' standard list style types are supported, plus some shortcuts like "letters", "ordered", "numbers", "unordered" (see below, sections "Parameters")



Installation/Download
Download the repository from here inside the folder  and then install the dependencies (phpmailer and dompdf) running composer update (in the folder )

Usage

 * See How it works on culturaitaliana.org

Examples
This is the simplest example of a form with inputs

which produces the following



Multiple choice with arbitrary input fields within choices (represented by the empty square brackets in the second-last row)



and much more! see the complete list of examples here

List of parameters
Please visit this page Help:Extension:CIForms for additional examples and here for their visualization.

Configuration
First ensure that the parameter  of your wiki is set to true, and that either   is set to some value, or   (all of them are typically located/placed in the file LocalSettings.php) contains the sender email address of your forms.

Conversely,  contains the email address to which the form data will be dispatched once submitted by the visitor, which will be used where the   parameter is missing from the form's template. (precisely a parser function).

The same applies to  and , they will be used as long as   and   are not specified within the form.

Output
CIForms produces a pdf with a form virtually identical to the original, with filled-in fields, which is sent to the provided email address upon form submission!

Known issues

 * Due to this Visual Editor's bug, if the 1st parameter after the function name is separated by a new line, Visual Editor will not recognize the template/parser function and will surround it with unwanted 'nowiki' tags. Therefore use always the following

rather than the following


 * the template is interpreted rigorously and the parser function does not try to fix little mistakes in the parameters, like missing pipes (|) or wrong parameters. This might be updated in future