Template documentationedit documentation

Use this template to create forms that add content to pages. Forms can contain up to 20 fields.

Parameters[edit source]

  • page — Name of the page where the form will post the data. If the page doesn't exist, it will be created. If the page exists, the data will be appended. If omitted, the current page will be used.
  • section — Name of the section where the form will post the data. If the section doesn't exist, it will be created. If the section exists, the data will be appended. If omitted, the data will be appended to the end of the page.
  • templateRequired. Name of the template that the form will use to process and format the data. If you don't want to use a template (or if you want to use several templates) then you can create a template meant to be substituted and set subst:Your template as the value of this parameter (example).
  • fieldN (replacing N for a number from 1 to 20) — Name of the field. This will be the name of the parameter fed to the template, so use lowercase and dashes to follow current template conventions (e.g. field1 = access-date). If you want to use anonymous parameters, just name them using numbers (e.g. field1 = 1).
  • fieldN-type — Type of the field. Supported values are:
    • text — This is the normal, default field type. Use it for plain text inputs.
    • textarea — Use it for multi-line text inputs.
    • location — Use it for location inputs with autocomplete feature.
    • boolean — Use it for yes-no inputs.
    • stars — Use it for star rating inputs.
    • hidden — Hides the input and label. Use it for hidden inputs.
    • section — Hides the input but not the label. Use it to create section titles and other breaks in your form.
  • fieldN-label — Label of the field.
  • fieldN-placeholder — Placeholder of the field.
  • fieldN-required — Wether the field is required. Any value means yes.
  • fieldN-value — Default value of the field.
  • fieldN-style — Extra CSS of the field.
  • send — Text of the Submit button. Default is "Send".
  • sending — Text to show while the data is being sent. Default is "Sending...".
  • sent — Text to show when the data is sent. Default is "Sent, thanks!".
  • class — Extra CSS class of the form.
  • style — Extra CSS styling of the form.
  • id — ID of the form. Useful for linking to it.

Examples[edit source]

Simple[edit source]

{{Form
| field1 = student
| field1-label = Are you a student?
| field1-type = boolean
| field2 = name
| field2-label = What's your name?
}}
YesNo
Are you a student?
What's your name?
Send

Advanced[edit source]

{{Form
| field1 = section1
| field1-type = section
| field1-label = '''Basic data'''
| field2 = student
| field2-label = Are you a student?
| field2-type = boolean
| field3 = name
| field3-label = What's your name?
| field4 = city
| field4-type = location
| field4-label = What city are you from?
| field5 = section2
| field5-type = section
| field5-label = '''Course data'''
| field6 = course
| field6-label = What course are you in?
}}
Basic data
YesNo
Are you a student?
What's your name?
What city are you from?
Course data
What course are you in?
Send

See also[edit source]

Template data[edit source]

Use this template to create forms that add content to pages.

Template parameters

This template prefers block formatting of parameters.

ParameterDescriptionTypeStatus
Templatetemplate

Name of the template that this form will use

Example
Place
Templaterequired
Pagepage

Name of the page that this form will edit

Default
The current page
Example
List of ecovillages
Page nameoptional
Sectionsection

Name of the section that this form will edit

Example
Page reviews
Stringoptional
Field 1field1

Name of the first field

Stringoptional
Field 1 typefield1-type

Field type

Example
location
Stringoptional
Field 1 requiredfield1-required

Is the field required?

Example
yes
Booleanoptional
Field 1 labelfield1-label

Label of the field

Stringoptional
Field 1 placeholderfield1-placeholder

Placeholder of the field

Stringoptional
Filed 1 valuefield1-value

Default value of the field

Stringoptional
Field 2field2

Name of the first field

Stringoptional
Field 2 typefield2-type

Field type

Example
location
Stringoptional
Field 2 requiredfield2-required

Is the field required?

Example
yes
Booleanoptional
Field 2 labelfield2-label

Label of the field

Stringoptional
Field 2 placeholderfield2-placeholder

Placeholder of the field

Stringoptional
Filed 2 valuefield2-value

Default value of the field

Stringoptional
Field 3field3

Name of the first field

Stringoptional
Field 3 typefield3-type

Field type

Example
location
Stringoptional
Field 3 requiredfield3-required

Is the field required?

Example
yes
Booleanoptional
Field 3 labelfield3-label

Label of the field

Stringoptional
Field 3 placeholderfield3-placeholder

Placeholder of the field

Stringoptional
Filed 3 valuefield3-value

Default value of the field

Stringoptional
Field 4field4

Name of the first field

Stringoptional
Field 4 typefield4-type

Field type

Example
location
Stringoptional
Field 4 requiredfield4-required

Is the field required?

Example
yes
Booleanoptional
Field 4 labelfield4-label

Label of the field

Stringoptional
Field 4 placeholderfield4-placeholder

Placeholder of the field

Stringoptional
Filed 4 valuefield4-value

Default value of the field

Stringoptional
Field 5field5

Name of the first field

Stringoptional
Field 5 typefield5-type

Field type

Example
location
Stringoptional
Field 5 requiredfield5-required

Is the field required?

Example
yes
Booleanoptional
Field 5 labelfield5-label

Label of the field

Stringoptional
Field 5 placeholderfield5-placeholder

Placeholder of the field

Stringoptional
Filed 5 valuefield5-value

Default value of the field

Stringoptional
Field 6field6

Name of the first field

Stringoptional
Field 6 typefield6-type

Field type

Example
location
Stringoptional
Field 6 requiredfield6-required

Is the field required?

Example
yes
Booleanoptional
Field 6 labelfield6-label

Label of the field

Stringoptional
Field 6 placeholderfield6-placeholder

Placeholder of the field

Stringoptional
Filed 6 valuefield6-value

Default value of the field

Stringoptional
Field 7field7

Name of the first field

Stringoptional
Field 7 typefield7-type

Field type

Example
location
Stringoptional
Field 7 requiredfield7-required

Is the field required?

Example
yes
Booleanoptional
Field 7 labelfield7-label

Label of the field

Stringoptional
Field 7 placeholderfield7-placeholder

Placeholder of the field

Stringoptional
Filed 7 valuefield7-value

Default value of the field

Stringoptional
Field 8field8

Name of the first field

Stringoptional
Field 8 typefield8-type

Field type

Example
location
Stringoptional
Field 8 requiredfield8-required

Is the field required?

Example
yes
Booleanoptional
Field 8 labelfield8-label

Label of the field

Stringoptional
Field 8 placeholderfield8-placeholder

Placeholder of the field

Stringoptional
Filed 8 valuefield8-value

Default value of the field

Stringoptional
Field 9field9

Name of the first field

Stringoptional
Field 9 typefield9-type

Field type

Example
location
Stringoptional
Field 9 requiredfield9-required

Is the field required?

Example
yes
Booleanoptional
Field 9 labelfield9-label

Label of the field

Stringoptional
Field 9 placeholderfield9-placeholder

Placeholder of the field

Stringoptional
Filed 9 valuefield9-value

Default value of the field

Stringoptional
Sendsend

Label of the Submit button

Default
Send
Example
Go!
Stringoptional
Sendingsending

Message when the data is being sent

Default
Sending...
Example
Your data is being sent, please wait...
Stringoptional
Sentsent

Message when the data is sent

Default
Sent, thanks!
Example
Your data was sent successfully, thanks!
Stringoptional
Classclass

Extra CSS class of the form

Example
noprint
Stringoptional
Stylestyle

Extra CSS styling of the form

Example
border: 1px solid #a2a9b1; background: #f8f9fa;
Stringoptional
IDid

ID of the form

Example
page-review-form
Unknownoptional
Cookies help us deliver our services. By using our services, you agree to our use of cookies.