Extension:TemplateFormEditor/Types

From MediaWiki.org
Jump to: navigation, search

Contents


This table describes all types of template parameters that are defined by this extension:

Type name Type Description Parameter Parameter Description

[edit] Default

or
  -

if an undefined type name (like "-" or "default") is entered for this parameter a simple single-line input field is shown (like in the form of the Extension:CustomEdit.

Parameters that are not mentioned inside the <typedefinition>-tag automatically have the default type. Only if you want to define an alternate Label or a comment you need to define a parameter with default type.

optional:

  • password
  • size

No parameters are needed but the following two are defined:

  • password - makes the input field a password field where the input is not shown.
  • size=n - where n is an Integer - Defines the width of the input field default value is 30
E.g.:
* ParameterName : - "Simple Parameter" // a single inputline is shown with this label and comment.
* Scanncode : - (password,size=5em) "PIN:" // enter your PIN (The value is not shown on the screen.)
* Date : - (size=10em) // write the Date in this format: YYYY-MM-DD 

[edit] text

For Parameters of this type a multi-line text area is shown in the Form. mandatory
  • width
  • height
Exactly two parameters are expected. the first is the width of the textfield the second is the number of lines.
E.g.:
* Parametername: text (20,4) "A textarea" // 20 columns wide and 4 lines high

[edit] oneof

For parameters of this type a drop down list is shown. The user can not enter a text he can only choose exactly one of the given values.

If you want to allow the user to select nothing, add an empty element to the list of allowed values

optional:
  • Sorted

mandatory:

  • Values

if the parameter "sorted" exists, the values are sorted alphabetically

Coma separated list of all allowed values is needed.

E.g.:

Depricated Syntax:

* Parametername : oneof (a Value, another value , (third value) ,"fourth") "Dropdownlist:" // you can choose exactly one of these four elements
* Parametername : oneof (,Video,Radio,Television) "Option:" // you MAY choose UP TO one option.
* Parametername : oneof (male,female) "sex" // exactly one sex must be selected.

New Syntax since Version 0.3.1:

* Parametername : oneof (values=(a Value, another value , "(third value)" ,"fourth")) "Dropdownlist:" // you can choose exactly one of these four elements
* Parametername : oneof (values=(,Video,Radio,Television),sorted) "Option:" // you MAY choose UP TO one option.
* Parametername : oneof (values=(male,female)) "sex" // exactly one sex must be selected.

[edit] someof

Allows the user to select any number of the offered elements (including all and none). optional:
  • sorted

mandatory:

  • Values
see description in "oneof"
E.g.:

Depricated Syntax:

* Parametername : someof (a Value, another value , (third value) ,"fourth") "list of checkboxes:" // you can choose any number of these four elements.
* Colors : someof (red,orange,yellow,green,blue,brown,gray,violett) "Favorite Colors:" // 
* Parametername : someof (Send an E-Mail when a new release is published) "Service" // checkbox: select it or not.

New Syntax since 0.3.1:

* Parametername : someof (values=(a Value, another value , "(third value)" ,"fourth")) "list of checkboxes:" // you can choose any number of these four elements.
* Colors : someof (sorted,values=(red,orange,yellow,green,blue,brown,gray,violett)) "Favorite Colors:" // 
* Parametername : someof (values=(Send an E-Mail when a new release is published)) "Service" // checkbox: select it or not.

In this example the value will be "Send an E-Mail when a new release is published" or nothing!

Personal tools
Namespaces

Variants
Actions
Navigation
Support
Download
Development
Communication
Print/export
Toolbox