Miscellaneous FORM elements

version 1
package wikindx4\core\display
author Mark Grimshaw

 Methods

FORM widgets class

__construct() 

print checkbox

checkbox(string $label, string $name, string $checked, string $title) : string

Parameters

$label

string

$name

string

$checked

string

Default is FALSE

$title

string

Default is ''

Returns

string

upload box

fileUpload(string $label, string $name, int $size) : string

Parameters

$label

string

$name

string

$size

int

Default is 30

Returns

string

end a form

formEnd() : string

Returns

string

print form header with hidden action field

formHeader(string $action, string $js) : string

$js is for javascript functions See UTF8::testFormInput for the hidden field 'utf8CharTest'

Parameters

$action

string

$js

string

Default is FALSE

Returns

string

print form header with hidden action field and name and id fields

formHeaderName(string $action, string $name, string $js) : string

js is for javascript functions

Parameters

$action

string

$name

string

$js

string

Default is FALSE

Returns

string

print form header with visible action field -- typically used for tinyMCE popups

formHeaderVisibleAction(string $action, string $name, string $js) : string

$js is for javascript functions See UTF8::testFormInput for the hidden field 'utf8CharTest'

Parameters

$action

string

$name

string

$js

string

Default is FALSE

Returns

string

print form header with hidden action field for multi-part upload forms

formMultiHeader(string $action, string $js) : string

Parameters

$action

string

$js

string

Default is FALSE

Returns

string

print form reset button

formReset() : string

Returns

string

print form footer with submit field

formSubmit(string $value, string $js, string $name) : string

Parameters

$value

string

Default is FALSE

$js

string

Default is FALSE

$name

string

Default is FALSE

Returns

string

print form footer with submit button field

formSubmitButton(string $value, string $name) : string

Parameters

$value

string

Default is FALSE

$name

string

Default is FALSE

Returns

string

print form footer with cancel/goBack field.

goBack() : string

Not recommended to use this. See: https://sourceforge.net/p/wikindx/v4-feature-requests/32/

Returns

string

print hidden form input

hidden(string $name, string $value) : string

Parameters

$name

string

$value

string

Returns

string

password input type

passwordInput(string $label, string $name, string $value, int $size, int $maxLength) : string

Parameters

$label

string

$name

string

$value

string

Default is FALSE

$size

int

Default is 20

$maxLength

int

Default is 255

Returns

string

print radio button

radioButton(string $label, string $name, string $value, string $checked) : string

Parameters

$label

string

$name

string

$value

string

Default is FALSE

$checked

string

Default is FALSE

Returns

string

reduce the size of long text (in select boxes usually) to keep web browser display tidy

reduceLongText(string $text, string $override) : string

optional $override allows the programmer to override the user set preferences

Parameters

$text

string

$override

string

Default is FALSE

Returns

string

create select boxes for HTML forms

selectFBox(string $label, string $name, array $array, int $size, int $override) : string

First OPTION is always SELECTED optional $override allows the programmer to override the user set preferences for character limiting in select boxes

Parameters

$label

string

$name

string

$array

array

$size

int

Default is 3

$override

int

Default is FALSE

Returns

string

create select boxes form HTML forms

selectFBoxValue(string $label, string $name, array $array, int $size, int $override) : string

First entry is default selection. OPTION VALUE is set so expects assoc. array where key holds this value optional $override allows the programmer to override the user set preferences for character limiting in select boxes

Parameters

$label

string

$name

string

$array

array

$size

int

Default is 3

$override

int

Default is FALSE

Returns

string

create select boxes form HTML forms

selectFBoxValueMultiple(string $label, string $name, array $array, int $size, int $override) : string

First entry is default selection. OPTION VALUE is set so expects assoc. array where key holds this value. MULTIPLE values may be selected optional $override allows the programmer to override the user set preferences for character limiting in select boxes

Parameters

$label

string

$name

string

$array

array

$size

int

Default is 3

$override

int

Default is FALSE

Returns

string

create select boxes for HTML forms

selectedBox(string $label, string $name, array $array, string $select, int $size, int $override) : string

'selected value' is set SELECTED optional $override allows the programmer to override the user set preferences for character limiting in select boxes

Parameters

$label

string

$name

string

$array

array

$select

string

$size

int

Default is 3

$override

int

Default is FALSE

Returns

string

create select boxes form HTML forms

selectedBoxValue(string $label, string $name, array $array, string $select, int $size, int $override) : string

$select is default selection. OPTION VALUE is set so expects assoc. array where key holds this value optional $override allows the programmer to override the user set preferences for character limiting in select boxes

Parameters

$label

string

$name

string

$array

array

$select

string

$size

int

Default is 3

$override

int

Default is FALSE

Returns

string

create select boxes form HTML forms

selectedBoxValueMultiple(string $label, string $name, array $array, array $values, int $size, int $override) : string

OPTION VALUE is set so expects assoc. array where key holds this value. MULTIPLE values may be selected optional $override allows the programmer to override the user set preferences for character limiting in select boxes

Parameters

$label

string

$name

string

$array

array

$values

array

$size

int

Default is 3

$override

int

Default is FALSE

Returns

string

text input type

textInput(string $label, string $name, string $value, int $size, int $maxLength) : string

Parameters

$label

string

$name

string

$value

string

Default is FALSE

$size

int

Default is 20

$maxLength

int

Default is 255

Returns

string

textarea input type

textareaInput(string $label, string $name, string $value, int $cols, int $rows) : string

Parameters

$label

string

$name

string

$value

string

Default is FALSE

$cols

int

Default is 30

$rows

int

Default is 5

Returns

string

textarea readonly

textareaReadonly(string $label, string $name, string $value, int $cols, int $rows) : string

Parameters

$label

string

$name

string

$value

string

Default is FALSE

$cols

int

Default is 30

$rows

int

Default is 5

Returns

string

Build a string for insertion of an HTML tag attribute.

inlineHtmlAttribute(string $name, string $value) : string

Ensures that the attribute value is never empty (incorrect syntax)

Parameters

$name

string

$value

string

Default is ''

Returns

string

 Properties

 

$class 
 

$insertJscriptAction 
 

$messages 
 

$session