Handymail_FormField

HandyMail - FormField class.

This class handles the generation of html form elements for the form.

package

HandyMail

author

I.G Laghidze developer@firewind.co.uk

Methods

Instantiate and return a FormField object, after populating the object parameters from the input arguments.

instantiate(string $id, string $name, string $type, string $label, array $params) : object
static

Arguments

$id

string

The field ID

$name

string

The field name

$type

string

The field type

$label

string

The field label

$params

array

The parameters array that were passed to HandyMail->add_field().

Response

object

The Handymail_FormField object with assigned properties.

Properties

Field name

name : string
var

Type(s)

string

Field Type

type : string
var

Type(s)

string

Field ID

id : string
var

Type(s)

string

Field Label

label : string
var

Type(s)

string

Field Placeholder

placeholder : string
var

Type(s)

string

Field Rows - Parsed exclusively for textarea form elements.

rows : string
var

Type(s)

string

An array of options for radio or checkbox form elements.

options : array
var

Type(s)

array

A unique class appended to the form element. Input prefix of handymail main class applies.

css_class : string
var

Type(s)

string

The fieldset group ID.

fieldset : integer
var

Type(s)

integer

If type = email and this is set to true, the input value for this field will be appended to the reply-to array in the main class.

reply_to : boolean
var

Type(s)

boolean

The HTML code for the form element

html : string
var

Type(s)

string