Name

_input

Type

_input

Synopsis

Create various input field using _input

Description

_input is like input in HTML, but can differ sometimes.

Parameters

All valid HTML attributes can be used, like :

name, value, class, placeholder, required etc..

For possible types you can search the FlexForm docs for all documentation that starts with _input.

Some examples for types are : text, url, phone, textarea, password, range, checkboxes, radiobutton, email and more.

There are some FlexForm specific attributes like parsepost and html.

- parsepost can be used on e.g. a hidden field where the value holds names of other fields to be switched at post processing. e.g.

This will read the form field value with name "title" and replace [title] in the value of the newtitle field

TODO: Above needs more details


- html attribute allows filtering input fields. The options are :

  • "default" which is the same as not adding it at all. It will filter by the HTMLPurifier rules (see link below)
  • "all" no filtering will be done (not even XSS hacks)
  • "nohtml" means all HTML will be filtered out
  • "custom" is used like this : "custom=b,u,i", meaning no html is allowed, except bold, italic and underline

- tempex attribute in FlexForm is a custom attribute. This is in its beta status and is being tested and tweaked.

Tempex stands for Template Execute. You can add this attribute to e.g. a text field, textarea, number field, etc.. The value of that field will be determent by the result of an executed/parsed template.

The value for tempex starts with the name of the template, followed by the field names in your form, all devided by a pipe. Those fields will be monitored for changes and when a change is detected the template is parsed and the result will be inserted into the field that has the tempex argument. Example :

<_form action="get" class="simple">
<_label for="fname">First name</_label> <_input type="text" id="fname" name="First name" /><BR>
<_label for="lname">Last name</_label>< _input type="text" id="lname" name="Last name" /><br>
<_label for="email">email address</_label> <_input type="email" id="email" name="email" /><br>
<_input type="textarea" size="150" name="total" class="tital" tempex="TestingTempex|First name|Last name|email" />
<_input type="submit" value="getsend" />
</_form>

Of course there should be a Template:TestingTempex in your wiki in this example.

- required attribute in FlexForm differs from the HTML variant.

When a HTML5 form field has the word "required" as an attribute, this field will always be required. Even required="no" will make the field required.

With FlexForm this needs to be required="required" for an input field to be required. Only required or required="no" or required="whatever" will not make the field a required field.

Example on how to use required in FlexForm :

<_input type="email" name="emailfield" placeholder="This is a placeholder" required="required" />

Example

Note

Links