Help:Extension:CIForms

This extension 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 be used as teaching tools for current students or to engage prospective ones.

Please go here Extension:CIForms for details about the extension and its installation.


Form with inputsEdit

The most common kind of form, it can contain an arbitrary number of rows, with any of the standard html input types among which 'text', 'email', 'password', 'textarea', 'email', 'search', 'tel', 'file', 'number', 'url', 'time', 'date' – thus currently only the native browser implementation is used.

A form can be created through a template like the following:

{{#CI form: 
title = Contact form
| submit = abc@test.org
| first and last name [] *
| email [email] *
| your message [textarea] *
}}

(to see the rendered examples please visit this page

where the double square brackets represent an input, the asterisk a mandatory field, and the pipe is of course used to separate rows. The input symbol can be either left blank (in this case the input type is assumed to be "text"), filled-in with one of the values above (like 'email', 'textarea', etc.) or completed with a placeholder, like in the following example:

{{#CI form: title = Contact form
| submit = abc@test.org
| [first name] *
| [last name] *
| [email=email] *
}}


(note that the placeholder label is placed within the input symbol itself and the the row does not contain other text, which otherwise would produce a "tabled" layout).

Predictably, the 'submit' field contains the email to which the filled-in form will be dispatched, and all forms also accept the parameters 'success message' with a message to be displayed to the user once the form has been correctly dispatched, and 'error message', where the form cannot be dispatched for any reason. (see table below, List of parameters for a structured list depending on the kind of form)

Form with multiple choice questionsEdit

A form intended either to create surveys of any kind, or as a teaching tool, to be combined with "Cloze tests" described below.

This is an example of multiple choice questions with arbitrary input fields among the answers:

{{#CI form: title = Why do you want to learn Italian?
| type = multiple choice  | list-type = letters | max answers = 2
| I want to work using Italian language 
| I want to study using Italian language 
| Cultural interest / personal knowledge 
| interpersonal relationships [] *
| prospective stay in Italy 
}}


where 'type' is the kind of form, 'list-type' the kind of list, which can be "none", "ordered", "unordered", "letters", "number", or any of the values listed here, 'max answers' the maximum number of allowed answers, the double square brackets represent as above an input field, and the asterisk indicates as above that the preceding input field is mandatory. (an input field can be added to every row, however no more than 1 input field per row is currently expected to be found)



Form with Cloze testsEdit

A kind of form mainly used to provide students with online exercises to assess their understanding of assigned teaching materials.

A Cloze (completion) test can be either with inline suggestions like the following:

{{#CI form: title = Metti i verbi al futuro semplice
| type = cloze test 
| * Vedo, vedo... che tra poco [incontrare=incontrerai] l'uomo della tua vita
| Vedo, vedo... che [avere] una grande vincita al gioco
| Questa carta mi dice che [vincere] il concorso che hai appena fatto
| Quest'altra carta mi dice che [sposarsi] al massimo entro tre anni
| Ah, qui vedo che [fare] un viaggio molto interessante
| Qui vedo che [andare] ad abitare in un'altra citta'
}}


where the asterisk at the beginning of the line denotes an example answer (conversely than indicating a mandatory field in the 'inputs' type) and the square brackets in each row denote inline suggestions (here the foreseen input type is 'text' in all cases). Also note that the example answer contains the solution after the equal symbol, conversely from the other inline suggestions.


...either with framed suggestions like the following:

{{#CI form: title = Completa con i tempi dati al futuro semplice
|type = cloze test
| suggestions = fare, imparare, svegliarsi, imparare, andare, fare
| * Quando andrò in pensione [fare=farò] una crociera
| [] l'inglese
| [] in palestra
| [] jogging tutti i giorni
| [] a ballare il tango
| [] tardi la mattina
}}

Note that the suggestion ('fare') related to the solution ('farò') put in the example answer, is automatically 'canceled' in the list of suggestions.

Also note that the Cloze tests above foresee solutions to be "transformed" relatively to the provided suggestions (specifically, the suggestions are provided in infinite form, and the solutions are expected to be in future simple) while of course the suggestions can be provided "as they are", where in this case it makes sense to only list them above the answers, like in the following example:

{{#CI form: type = cloze test 
| title = Completa come nell'esempio 
| suggestions = poca, nessun, poco, altra, molti, troppo, nessuno, tante, qualsiasi, qualche, ogni
| * C'è [altra] pasta ? Ho ancora fame
| Non c'è [] tavolo libero: aspettiamo o cambiamo ristorante?
| Ho bevuto [] spumante. Mi gira la testa.
| a [] mattina la mia sveglia suona alle 7.00
| Se c'è un problema, chiamami a [] ora
| Ho scritto [] cartolina e poi sono uscito a comprare i francobolli
| Stefano legge [] romanzi gialli perché gli piace trovare il colpevole
| a [] persone passano il fine settimana fuori città
| C'è [] latte nel frigo, lo compri tu?
| Ho [] voglia di vedere mia cugina. Ultimamente non andiamo d'accordo.
| Bravo! Questo compito è perfetto. Non c'è [] sbaglio.
}}

(note that the input field in the example answer only contains 1 word, since an exact match is expected: i.e., the suggestion corresponds to the solution, without any "transformation")

Finally, "framed" suggestions (i.e. suggested words listed as argument of the parameter "suggestions") are automatically shuffled, thus it is a good practice to not put them in the right order, since the wiki-text is to be deemed open-source.


Nested form sectionsEdit

CI forms are flexible enough to allow nested form sections of different kind, using the following model:


{{#CI form: 
title = Enrollment test 
| submit = abc@test.org
|

{{#CI form section: type = inputs
| first name [] *
| last name [] *
| email [email] *
}}

{{#CI form section: ... }}

... [additional 'CI form sections']

}}

where in short the parser function 'CI form' becomes a container for the parser function 'CI form section' and the latter is characterized with a type (either 'inputs', 'multiple choice questions', or 'cloze test') a title, and the related content. (see table below List of parameters for all the accepted parameters)

This model allows a large combination of possible forms able to cover a correspondent wide range of needs, and, the most important, to create either a form with inputs, a multiple choice question test, or a Cloze test, in minutes, just filling-in with different contents predefined templates similar or identical to those shown as example.


For the complete list of parameters please go here Extension:CIForms