Editing CIForms sandbox

Jump to navigation Jump to search
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.

Latest revision Your text
Line 1: Line 1:
This is a sandbox for https://www.mediawiki.org/wiki/Extension:CIForms !
This is a sandbox for https://www.mediawiki.org/wiki/Extension:CIForms !
==Basic, one column==
This is the simplest form (type "inputs" by default, one column)
The square brackets represent an input, the square brackets contain the input type, the asterisk indicates a mandatory field


<pre>
<pre>
{{#CI form: title = Contact form
{{#CI form: title = Contact form
| type = inputs
| submission groups = sysop
| first and last name [] *
| first and last name [] *
| email [email] *
| email [email] *
Line 17: Line 10:
</pre>
</pre>


which produces the following
which produces the following result




{{#CI form: title = Contact form
{{#CI form: title = Contact form
| type = inputs
| submission groups = sysop
| submission groups = sysop
| first and last name [] *
| first and last name [] *
Line 28: Line 20:
}}
}}


==Placeholders==
Form with placeholders. The square brackets contain the placeholder and optionally the input type after the equal symbol:


<pre>
<pre>
Line 45: Line 32:


which produces the following:
which produces the following:
 


{{#CI form: title = Contact form
{{#CI form: title = Contact form
Line 53: Line 40:
| [your message=textarea]  *
| [your message=textarea]  *
}}
}}
==Two columns==
Inputs responsive (two columns), the square brackets contain the input type, the form rows can contain html (the label of the email input is bold)


<pre>
<pre>
Line 67: Line 47:
| first name [] *
| first name [] *
| last name [] *
| last name [] *
| <b>email</b> [email] *
| email [email] *
| phone [tel]
| phone [tel]
| your message [textarea]  *
| your message [textarea]  *
Line 76: Line 56:
{{#CI form: title = Contact form
{{#CI form: title = Contact form
| type = inputs responsive
| type = inputs responsive
| submit = abc@test.com
| first name [] *
| first name [] *
| last name [] *
| last name [] *
| <b>email</b> [email] *
| email [email] *
| phone [tel]
| phone [tel]
| your message [textarea]  *
| your message [textarea]  *
}}
}}


== Multiple choice ==
Multiple choice with arbitrary text inputs between answers (on the last line in the example)


<pre>
<pre>
{{#CI form: title = Why are you applying to this job ?
{{#CI form: title = Why do you want to learn Italian?
| type = multiple choice  
| type = multiple choice | list-type = letters | max answers = 2
| I send bulk application, even if I will be selected I'm not sure to confirm
| I want to work using Italian language
| I ran out of money, I have to find whatever job quickly
| I want to study using Italian language
| I want to learn something new
| Cultural interest / personal knowledge
| The job fits my background and I'm very skilled, I look forward to join your team!
| interpersonal relationships [] *
| Let me explain []  
| prospective stay in Italy
}}
}}
</pre>
</pre>




{{#CI form: title = Why are you applying to this job ?
{{#CI form: title = Why do you want to learn Italian?
| type = multiple choice
| type = multiple choice | list-type = letters | max answers = 2
| I send bulk application, even if I will be selected I'm not sure to confirm
| I want to work using Italian language
| I ran out of money, I have to find whatever job quickly
| I want to study using Italian language
| I want to learn something new
| Cultural interest / personal knowledge
| The job fits my background and I'm very skilled, I look forward to join your team!
| interpersonal relationships [] *
| Let me explain []  
| prospective stay in Italy
}}
}}


== Select ==
Select with placeholder and hardcoded options. An option contain a comma? Just escape it!


<pre>
<pre>
{{#CI form: title = Select your preferred IT course
{{#CI form: title = Metti i verbi al futuro semplice
| type = inputs
| type = cloze test
| [Please chose one=select=PHP and Mysql, Node.js\, Vue.js\, React, Mediawiki and Gerrit ] *
| * 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'
}}
}}
</pre>
</pre>




{{#CI form: title = Select your preferred IT course
{{#CI form: title = Metti i verbi al futuro semplice
| type = inputs
| type = cloze test
| [Please chose one=select=PHP and Mysql, Node.js\, Vue.js\, React, Mediawiki and Gerrit ] *
| * 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'
}}
}}


Line 133: Line 113:




==Select with combobox==


Select populated by wikitext (if the select contains more than 20 options CIForms will automatically display it as a [https://select2.org/ select2] combobox)


<pre>
{{#CI form: title = Country and city
| type = inputs
| country [select={{#replace:{{Template:Countries}}|*|,}}] *
| city [] *
}}
</pre>




{{#CI form: title = Country and city
| type = inputs
| country [select={{#replace:{{Template:Countries}}|*|,}}] *
| city [] *
}}








==Nested sections==


Form with nested sections. The multiple choice accepts up to 3 answers ("max answers=3") The textarea has a maxlength attribute ("[textarea=1000]")
{{#CI form:  
 
title = Simple form
<pre>
{{#CI form: title = Job application
| submission groups = sysop
| submission groups = sysop
|
{{#CI form section: type = inputs
| name [] *
| name [] *
| email [] *
| email [email] *
}}
| message [textarea=250] *
|
{{#CI form section: type = inputs
| title = What about your motivation ?
| type = multiple choice
| I send bulk application, even if I will be selected I'm not sure to confirm
| I ran out of money, I have to find whatever job quickly
| I want to learn something new
| The job fits my background and I'm very skilled, I look forward to join your team!
| Let me explain []  
}}
}}


{{#CI form section: type = multiple choice
| title = If you will be selected (on the basis of the answer above), how will you undertake your work ? (up to 3 answers allowed)
| type = multiple choice
| max answers=3
| I will work scrupulously
| I will work meticulously
| I will pretend to work
| I will delegate all my work to my sister
| I will work seriously
}}


{{#CI form section: type = inputs
{{#CI form:  
|title = Please describe yourself (1000 characters max)
title = Simple form (inputs)
| [textarea=1000] *
| submission groups = sysop
| name [] *
| email [email] *
| message [textarea=250] *
}}
}}


}}
</pre>




{{#CI form: title = Job application
{{#CI form: title = Form with nested sections
| submission groups = sysop
| submission groups = sysop
|
|
{{#CI form section: type = inputs  
{{#CI form section: type = inputs  
| name [] *
| Are you applying as [select={{#replace:{{Template:Countries}}|*|,}}]
| email [] *
}}
}}
|
|
{{#CI form section: type = inputs
{{#CI form section: type = inputs
| title = What about your motivation ?
| title = What kind of data should be entered in this form ?  
| type = multiple choice
| [textarea]
| I send bulk application, even if I will be selected I'm not sure to confirm
| I ran out of money, I have to find whatever job quickly
| I want to learn something new
| The job fits my background and I'm very skilled, I look forward to join your team!
| Let me explain []  
}}
}}


{{#CI form section: type = multiple choice
{{#CI form section: type = multiple choice
| title = If you will be selected (on the basis of the answer above), how will you undertake your work ? (up to 3 answers allowed)
| title = Is the project open-source?
| type = multiple choice
| Yes
| max answers=3
| No []
| I will work scrupulously
| I will work meticulously
| I will pretend to work
| I will delegate all my work to my sister
| I will work seriously
}}
 
{{#CI form section: type = inputs
|title = Please describe yourself (1000 characters max)
| [textarea=1000] *
}}
 
 
}}
 
==Cloze test==
 
Cloze tests are mainly used to administer quizzes and tests.
 
Square brackets represent an input, a square bracket with text inside represents a suggestion. The asterisk represents an example sentence. Each row can contain an arbitrary number of inputs.
 
<pre>
{{#CI form: type = cloze test
| title = Put the verbs between parentheses in the proper tense
| * I (to be) [have been] proud to win the match
| I (to do) [] a wonderful work
| I (to drink) [] too much at the last party
| I (to eat) [] 3 pizzas and 4 portions of french fries, and now I don't perform really well in intimate situations
| (to make) We are such stuff as dreams are [] on; and our little life ...
}}
</pre>
 
{{#CI form: type = cloze test
| title = Put the verbs between parentheses in the proper tense
| * I (to be) [have been] proud to win the match
| I (to do) [] a wonderful work
| I (to drink) [] too much at the last party
| I (to eat) [] 3 pizzas and 4 portions of french fries, and now I don't perform really well in intimate situations
| (to make) We are such stuff as dreams are [] on; and our little life ...
}}
 
==Cloze test with suggestions==
 
The list of suggestions is automatically shuffled and the suggestion is automatically canceled from the list. (line-through)
 
<pre>
{{#CI form: type = cloze test
| title = Put the right word in each sentence
| suggestions = pencils, cats, dogs, car, house, pizzas
| * There are three [pencils] on my table
| My [] is pretty fast
| My [] barks a lot but welcomes thieves equipped with sausages
| I love [] because they say "meeeooow"
| I'm able to eat 4 [] at any time
| My [] has 3 swimming pools and a bowling lane, are you envious ?
}}
}}
</pre>


{{#CI form: type = cloze test  
{{#CI form section: type = cloze test
| title = Put the right word in each sentence
| title = cloze test title
| suggestions = pencils, cats, dogs, car, house, pizzas
| label a [] label b []  
| * There are three [pencils] on my table
| label c []  
| My [] is pretty fast
| label d
| My [] barks a lot but welcomes thieves equipped with sausages
| I love [] because they say "meeeooow"
| I'm able to eat 4 [] at any time
| My [] has 3 swimming pools and a bowling lane, are you envious ?
}}
}}


==Cloze test with transformed suggestions==
In some cases the answer has to be "transformed" with regard of the list of suggestions. In this case the relationship is expressed with the equal symbol within square brackets.
<pre>
{{#CI form: type = cloze test
| title = Chose the right verb for each sentence and put it in the proper tense
| suggestions = to be, to win, to do, to drink, to make
| * I [to be=have been] proud to win the match
| I [] a wonderful work
| I [] too much at the last party
| I [] 3 pizzas and 4 portions of french fries, and now I don't perform really well in intimate situations
| We are such stuff as dreams are [] on; and our little life ...
}}
</pre>
{{#CI form: type = cloze test
| title = Chose the right verb for each sentence and put it in the proper tense
| suggestions = to be, to win, to do, to drink, to make
| * I [to be=have been] proud to win the match
| I [] a wonderful work
| I [] too much at the last party
| I [] 3 pizzas and 4 portions of french fries, and now I don't perform really well in intimate situations
| We are such stuff as dreams are [] on; and our little life ...
}}
==Cloze tests with html ==
The following is a quiz adapted from [https://en.wikiversity.org/wiki/Help:Quiz-Simple this page]
<pre>
{{#CI form: title = Complete the text from the Wikipedia article on [https://en.wikipedia.org/wiki/Aristotle Aristotle]
| type = cloze test
| list-type = none
| suggestions =  Athens, Nicomachus, eighteen, 347, Stageira, Phaestis, Plato
| <b>Early Years</b> <br> Aristotle was born in [Stageira] in Chalcidice. His parents were []  and [], who became physician to King Amyntas of Macedon. <br> Aristotle was educated as a member of the aristocracy. At about the age of [], he went to [] to continue his education at []'s Academy for nearly twenty years, not leaving until after
Plato's death in [] BC.
}}
</pre>
{{#CI form: title = Complete the text from the Wikipedia article on [https://en.wikipedia.org/wiki/Aristotle Aristotle]
| type = cloze test | list-type = none
| suggestions =  Athens, Nicomachus, eighteen, 347, Stageira, Phaestis, Plato
| <b>Early Years</b> <br> Aristotle was born in [Stageira] in Chalcidice. His parents were []  and [], who became physician to King Amyntas of Macedon. <br> Aristotle was educated as a member of the aristocracy. At about the age of [], he went to [] to continue his education at []'s Academy for nearly twenty years, not leaving until after
Plato's death in [] BC.
}}
}}
Please note that all contributions to Wikisphere may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see Wikisphere:Copyrights for details). Do not submit copyrighted work without permission!
Cancel Editing help (opens in new window)

Template used on this page: