FORM.php
WIKINDX : Bibliographic Management system.
Tags
Table of Contents
Functions
- _inlineHtmlAttribute() : string
- Build a string for insertion of an HTML tag attribute.
- formHeader() : string
- print form header with hidden action field
- formHeaderVisibleAction() : string
- print form header with visible action field -- typically used for tinyMCE popups
- formHeaderName() : string
- print form header with hidden action field and name and id fields
- formEnd() : string
- end a form
- formMultiHeader() : string
- print form header with hidden action field for multi-part upload forms
- formSubmit() : string
- print form footer with submit field
- closePopup() : string
- print form footer with close popup button
- formSubmitButton() : string
- print form footer with submit button field
- formReset() : string
- print form reset button
- hidden() : string
- print hidden form input
- hiddenNoJSNoId() : string
- print hidden form input without JavaScript action
- radioButton() : string
- print radio button
- radioButtonGroup() : string
- Print a radio button group.
- checkbox() : string
- print checkbox
- selectYesNoBox() : string
- create special select box that only provides yes (1) and no (0) as options (values)
- selectFBox() : string
- create select boxes for HTML forms
- selectedBox() : string
- create select boxes for HTML forms
- selectFBoxValue() : string
- create select boxes for HTML forms
- selectedBoxValue() : string
- create select boxes for HTML forms
- selectFBoxValueMultiple() : string
- create select boxes for HTML forms
- selectedBoxValueMultiple() : string
- create select boxes for HTML forms
- passwordInput() : string
- password input type
- honeypotInput() : string
- A honeypot field made with text input
- textInput() : string
- text input type
- colorInput() : string
- color input type
- textareaInput() : string
- textarea input type
- textareaInputmceNoEditor() : string
- textarea input type without MCE editor
- textareaReadonly() : string
- textarea readonly
- fileUpload() : string
- upload box
- fileUploadMultiple() : string
- upload box for multiple files
- dateInput() : string
- date input type
- label() : string
- Label Form element
Functions
_inlineHtmlAttribute()
Build a string for insertion of an HTML tag attribute.
_inlineHtmlAttribute([string $name = '' ][, mixed $value = '' ]) : string
Ensures that the attribute value is never empty (incorrect syntax)
Parameters
- $name : string = ''
- $value : mixed = ''
-
Default is ''
Return values
stringformHeader()
print form header with hidden action field
formHeader(string $action[, string $js = '' ][, bool $BT = TRUE ]) : string
$js is for javascript functions
Parameters
- $action : string
- $js : string = ''
-
Default is ''
- $BT : bool = TRUE
-
Default is TRUE
Return values
stringformHeaderVisibleAction()
print form header with visible action field -- typically used for tinyMCE popups
formHeaderVisibleAction(string $action, string $name[, string $js = '' ][, bool $BT = TRUE ]) : string
$js is for javascript functions
Parameters
- $action : string
- $name : string
- $js : string = ''
-
Default is ''
- $BT : bool = TRUE
-
Default is TRUE
Return values
stringformHeaderName()
print form header with hidden action field and name and id fields
formHeaderName(string $action, string $name[, string $js = '' ][, bool $BT = TRUE ]) : string
js is for javascript functions
Parameters
- $action : string
- $name : string
- $js : string = ''
-
Default is ''
- $BT : bool = TRUE
-
Default is TRUE
Return values
stringformEnd()
end a form
formEnd() : string
Return values
stringformMultiHeader()
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 ''
Return values
stringformSubmit()
print form footer with submit field
formSubmit([mixed $value = FALSE ][, string|false $name = FALSE ][, string $js = '' ]) : string
Parameters
- $value : mixed = FALSE
-
Default is FALSE
- $name : string|false = FALSE
-
Default is FALSE
- $js : string = ''
-
Default is ''
Return values
stringclosePopup()
print form footer with close popup button
closePopup(mixed $value) : string
Parameters
- $value : mixed
Return values
stringformSubmitButton()
print form footer with submit button field
formSubmitButton(mixed $value[, string|false $name = FALSE ][, string $js = '' ]) : string
Parameters
- $value : mixed
-
Default is FALSE
- $name : string|false = FALSE
-
Default is FALSE
- $js : string = ''
-
Default is ''
Return values
stringformReset()
print form reset button
formReset(mixed $value[, string $js = '' ]) : string
Parameters
- $value : mixed
- $js : string = ''
-
Default is ''
Return values
stringhidden()
print hidden form input
hidden(string $name, string $value[, string $js = '' ]) : string
Parameters
- $name : string
- $value : string
- $js : string = ''
-
Default is ''
Return values
stringhiddenNoJSNoId()
print hidden form input without JavaScript action
hiddenNoJSNoId(string $name, mixed $value) : string
Parameters
- $name : string
- $value : mixed
Return values
stringradioButton()
print radio button
radioButton(string $name[, mixed $value = FALSE ][, bool|string $checked = FALSE ][, string $js = '' ]) : string
Parameters
- $name : string
- $value : mixed = FALSE
-
Default is FALSE
- $checked : bool|string = FALSE
-
Default is FALSE
- $js : string = ''
-
Default is ''
Return values
stringradioButtonGroup()
Print a radio button group.
radioButtonGroup(string $groupName, array<string|int, mixed> $buttons, mixed $checkedValue[, string $divider = BR ][, string $js = '' ]) : string
For more fine-grained control over radio buttons (individual $js for each button, placement of label etc.), do not use this but use radioButton() directly.
Parameters
- $groupName : string
- $buttons : array<string|int, mixed>
-
[$buttonValue => $buttonLabel]
- $checkedValue : mixed
-
Which $buttonValue is checked
- $divider : string = BR
-
Default BR
- $js : string = ''
-
Default ''
Return values
stringcheckbox()
print checkbox
checkbox(string $label, string $name[, bool|string $checked = FALSE ][, string $title = '' ][, string $js = '' ]) : string
Parameters
- $label : string
- $name : string
- $checked : bool|string = FALSE
-
Default is FALSE
- $title : string = ''
-
Default is ''
- $js : string = ''
-
Default is ''
Return values
stringselectYesNoBox()
create special select box that only provides yes (1) and no (0) as options (values)
selectYesNoBox(string $name, string|null $select[, string $js = '' ]) : string
'selected value' is set SELECTED
Parameters
- $name : string
- $select : string|null
- $js : string = ''
-
Default is ''
Return values
stringselectFBox()
create select boxes for HTML forms
selectFBox(string $name, array<string|int, mixed> $array[, int $size = 3 ][, int|bool $override = FALSE ][, string $js = '' ]) : string
First OPTION is always SELECTED optional $override allows the programmer to override the user set preferences for character limiting in select boxes
Parameters
- $name : string
- $array : array<string|int, mixed>
- $size : int = 3
-
Default is 3
- $override : int|bool = FALSE
-
Default is FALSE
- $js : string = ''
-
Default is ''
Return values
stringselectedBox()
create select boxes for HTML forms
selectedBox(string $name, array<string|int, mixed> $array, string $select[, int $size = 3 ][, int|bool $override = FALSE ][, string $js = '' ]) : string
'selected value' is set SELECTED optional $override allows the programmer to override the user set preferences for character limiting in select boxes
Parameters
- $name : string
- $array : array<string|int, mixed>
- $select : string
- $size : int = 3
-
Default is 3
- $override : int|bool = FALSE
-
Default is FALSE
- $js : string = ''
-
Default is ''
Return values
stringselectFBoxValue()
create select boxes for HTML forms
selectFBoxValue(string $name, array<string|int, mixed> $array[, int $size = 3 ][, int|bool $override = FALSE ][, string $js = '' ]) : 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
- $name : string
- $array : array<string|int, mixed>
- $size : int = 3
-
Default is 3
- $override : int|bool = FALSE
-
Default is FALSE
- $js : string = ''
-
Default is ''
Return values
stringselectedBoxValue()
create select boxes for HTML forms
selectedBoxValue(string $name, array<string|int, mixed> $array, string $select[, int $size = 3 ][, int|bool $override = FALSE ][, string $js = '' ]) : 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
- $name : string
- $array : array<string|int, mixed>
- $select : string
- $size : int = 3
-
Default is 3
- $override : int|bool = FALSE
-
Default is FALSE
- $js : string = ''
-
Default is ''
Return values
stringselectFBoxValueMultiple()
create select boxes for HTML forms
selectFBoxValueMultiple(string $name, array<string|int, mixed> $array[, int $size = 3 ][, int|bool $override = FALSE ][, string $js = '' ]) : 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
- $name : string
- $array : array<string|int, mixed>
- $size : int = 3
-
Default is 3
- $override : int|bool = FALSE
-
Default is FALSE
- $js : string = ''
-
Default is ''
Return values
stringselectedBoxValueMultiple()
create select boxes for HTML forms
selectedBoxValueMultiple(string $name, array<string|int, mixed> $array, array<string|int, mixed> $values[, int $size = 3 ][, int|bool $override = FALSE ][, string $js = '' ]) : 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
- $name : string
- $array : array<string|int, mixed>
- $values : array<string|int, mixed>
- $size : int = 3
-
Default is 3
- $override : int|bool = FALSE
-
Default is FALSE
- $js : string = ''
-
Default is ''
Return values
stringpasswordInput()
password input type
passwordInput(string $name[, mixed $value = FALSE ][, int $size = 20 ][, int $maxLength = 255 ][, string $js = '' ]) : string
Parameters
- $name : string
- $value : mixed = FALSE
-
Default is FALSE
- $size : int = 20
-
Default is 20
- $maxLength : int = 255
-
Default is 255
- $js : string = ''
-
Default is ''
Return values
stringhoneypotInput()
A honeypot field made with text input
honeypotInput(string $name) : string
Robots fill it by mistake and are pawned!
Parameters
- $name : string
Return values
stringtextInput()
text input type
textInput(string $name[, mixed $value = FALSE ][, int $size = 20 ][, int $maxLength = 255 ][, string $js = '' ]) : string
Parameters
- $name : string
- $value : mixed = FALSE
-
Default is FALSE
- $size : int = 20
-
Default is 20
- $maxLength : int = 255
-
Default is 255
- $js : string = ''
-
Default is ''
Return values
stringcolorInput()
color input type
colorInput(string $name[, mixed $value = FALSE ][, string $js = '' ]) : string
Parameters
- $name : string
- $value : mixed = FALSE
-
Default is FALSE
- $js : string = ''
-
Default is ''
Return values
stringtextareaInput()
textarea input type
textareaInput(string $name[, mixed $value = FALSE ][, int $cols = 30 ][, int $rows = 5 ][, string $js = '' ]) : string
Parameters
- $name : string
- $value : mixed = FALSE
-
Default is FALSE
- $cols : int = 30
-
Default is 30
- $rows : int = 5
-
Default is 5
- $js : string = ''
-
Default is ''
Return values
stringtextareaInputmceNoEditor()
textarea input type without MCE editor
textareaInputmceNoEditor(string $name[, mixed $value = FALSE ][, int $cols = 30 ][, int $rows = 5 ][, string $js = '' ]) : string
Parameters
- $name : string
- $value : mixed = FALSE
-
Default is FALSE
- $cols : int = 30
-
Default is 30
- $rows : int = 5
-
Default is 5
- $js : string = ''
-
Default is ''
Return values
stringtextareaReadonly()
textarea readonly
textareaReadonly(string $name[, mixed $value = FALSE ][, int $cols = 30 ][, int $rows = 5 ][, string $js = '' ]) : string
Parameters
- $name : string
- $value : mixed = FALSE
-
Default is FALSE
- $cols : int = 30
-
Default is 30
- $rows : int = 5
-
Default is 5
- $js : string = ''
-
Default is ''
Return values
stringfileUpload()
upload box
fileUpload(string $name[, int $size = 20 ][, string $accept = "" ][, string $js = '' ]) : string
Parameters
- $name : string
- $size : int = 20
-
Default is 20
- $accept : string = ""
-
Default is "" (all file types)
- $js : string = ''
-
Default is ''
Return values
stringfileUploadMultiple()
upload box for multiple files
fileUploadMultiple(string $name[, int $size = 20 ][, string $accept = "" ][, string $js = '' ]) : string
Parameters
- $name : string
- $size : int = 20
-
Default is 20
- $accept : string = ""
-
Default is "" (all file types)
- $js : string = ''
-
Default is ''
Return values
stringdateInput()
date input type
dateInput(string $name[, mixed $value = FALSE ][, string $js = '' ]) : string
Parameters
- $name : string
- $value : mixed = FALSE
-
Default is FALSE
- $js : string = ''
-
Default is ''
Return values
stringlabel()
Label Form element
label(string $for) : string
Parameters
- $for : string
-
Id of the form control associated to this label