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


- 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