Properties

$_cols

$_cols : 

number of columns

Type

$_rows

$_rows : 

number of rows

Type

$_value

$_value : 

initial content

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

$htmlEditor

$htmlEditor : 

Extended HTML editor

If an extended HTML editor is set, the renderer will be replaced by the specified editor, usually a visual or WYSIWYG editor.

    Developer and user guide:
    • For run-time settings per call
    • To use an editor pre-configured by APIEditor, e.g. 'fckeditor': $options['editor'] = 'fckeditor';
    • To use a custom editor, e.g. 'MyEditor' class located in "/modules/myeditor/myeditor.php": $options['editor'] = array('MyEditor', API_ROOT_PATH . "/modules/myeditor/myeditor.php");
    • For pre-configured settings, which will force to use a editor if no specific editor is set for call
      • Set up custom configs: in API_VAR_PATH . '/configs/apiconfig.php' set a editor as default, e.g.
      • a pre-configured editor 'fckeditor': return array('editor' => 'fckeditor');
      • a custom editor 'MyEditor' class located in "/modules/myeditor/myeditor.php": return array('editor' => array('MyEditor', API_ROOT_PATH . "/modules/myeditor/myeditor.php");
    • To disable the default editor, in API_VAR_PATH . '/configs/apiconfig.php': return array();
    • To disable the default editor for a specific call: $options['editor'] = 'dhtmltextarea';

Type

$_hiddenText

$_hiddenText : 

Hidden text

Type

$skipPreview

$skipPreview : 

Type

$doHtml

$doHtml : 

Type

$js

$js : 

Type

Methods

__construct()

__construct(  caption,   name,   value,   rows = 5,   cols = 50,   hiddentext = apiHiddenText, mixed||string|int  options = array()) : 

Constructor

Parameters

caption

Caption

name

"name" attribute

value

Initial text

rows

Number of rows

cols

Number of columns

hiddentext

Identifier for hidden Text

mixed||string|int options

Extra options

Returns

getRows()

getRows() : 

get number of rows

Returns

getCols()

getCols() : 

Get number of columns

Returns

getValue()

getValue(  encode = false) : 

Get initial content

Parameters

encode

To sanitizer the text? Default value should be "true"; however we have to set "false" for backward compatibility

Returns

setValue()

setValue( value) : 

Set initial content

Parameters

value

string

Returns

render()

render() : 

Prepare HTML for output

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

Returns

HTML

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() : bool|string

APIFormDhtmlTextArea::renderValidationJS()

Returns

bool|string —