Properties

$_value

$_value : 

Value

Type

$customValidationCode

$customValidationCode : mixed||string|int

Javascript performing additional validation of this element data

This property contains a list of Javascript snippets that will be sent to APIForm::renderValidationJS(). NB: All elements are added to the output one after the other, so don't forget to add a ";" after each to ensure no Javascript syntax error is generated.

Type

mixed||string|int — ()

$_name

$_name : 

"name" attribute of the element

Type

$_caption

$_caption : 

caption of the element

Type

$_accesskey

$_accesskey : 

Accesskey for this element

Type

$_class

$_class : mixed||string|int

HTML classes for this element

Type

mixed||string|int —

$_hidden

$_hidden : 

hidden?

Type

$_extra

$_extra : mixed||string|int

extra attributes to go in the tag

Type

mixed||string|int —

$_required

$_required : 

required field?

Type

$_description

$_description : 

description of the field

Type

$_nocolspan

$_nocolspan : 

CAtzwolf: Modified for No Colspan

Lets a developer have only one column in a form element rather than two. Example of usgage: Allows text editors to span 2 columns rathe than pushed into one column

Type

$_formtype

$_formtype : 

Get form type

Type

Methods

__construct()

__construct(  name = API_TOKEN,   timeout) : 

Constructor

Parameters

name

"name" attribute

timeout

Returns

getValue()

getValue(  encode = false) : 

Get the "value" attribute

Parameters

encode

To sanitizer the text?

Returns

setValue()

setValue( value) : 

Sets the "value" attribute

Parameters

value

Returns

render()

render() : 

Generates output for the element.

This method is abstract and must be overwritten by the child classes.

Returns

isContainer()

isContainer() : 

Is this element a container of other elements?

Returns

false

setName()

setName(  name) : 

set the "name" attribute for the element

Parameters

name

"name" attribute for the element

Returns

getName()

getName(  encode = true) : 

get the "name" attribute for the element

Parameters

encode

Returns

"name" attribute

setAccessKey()

setAccessKey(  key) : 

set the "accesskey" attribute for the element

Parameters

key

"accesskey" attribute for the element

Returns

getAccessKey()

getAccessKey() : 

get the "accesskey" attribute for the element

Returns

"accesskey" attribute value

getAccessString()

getAccessString(  str) : 

If the accesskey is found in the specified string, underlines it

Parameters

str

String where to search the accesskey occurence

Returns

Enhanced string with the 1st occurence of accesskey underlined

setClass()

setClass(  class) : 

set the "class" attribute for the element

Parameters

class

Returns

getClass()

getClass() : 

get the "class" attribute for the element

Returns

"class" attribute value

setCaption()

setCaption(  caption) : 

set the caption for the element

Parameters

caption

Returns

getCaption()

getCaption(  encode = false) : 

get the caption for the element

Parameters

encode

To sanitizer the text?

Returns

getTitle()

getTitle(  encode = true) : 

get the caption for the element

Parameters

encode

To sanitizer the text?

Returns

setDescription()

setDescription(  description) : 

set the element's description

Parameters

description

Returns

getDescription()

getDescription(  encode = false) : 

get the element's description

Parameters

encode

To sanitizer the text?

Returns

setHidden()

setHidden() : 

flag the element as "hidden"

Returns

isHidden()

isHidden() : 

Find out if an element is "hidden".

Returns

isRequired()

isRequired() : 

Find out if an element is required.

Returns

setExtra()

setExtra(  extra,   replace = false) : mixed||string|int

Add extra attributes to the element.

This string will be inserted verbatim and unvalidated in the element's tag. Know what you are doing!

Parameters

extra
replace

If true, passed string will replace current content otherwise it will be appended to it

Returns

mixed||string|int —

New content of the extra string

getExtra()

getExtra(  encode = false) : 

Get the extra attributes for the element

Parameters

encode

To sanitizer the text?

Returns

setNocolspan()

setNocolspan(  nocolspan = true) : 

Set the element's nocolspan Modified by Catzwolf

Parameters

nocolspan

Returns

getNocolspan()

getNocolspan() : 

Get the element's nocolspan Modified by Catzwolf

Returns

getFormType()

getFormType() : 

get the element's nocolspan Modified by Catzwolf

Returns

setFormType()

setFormType(  value) : 

set the element's nocolspan Modified by Catzwolf

Parameters

value

Returns

renderValidationJS()

renderValidationJS() : 

Render custom javascript validation code

Returns