TQuickForm
extends TForm
in package
Create quick forms for input data with a standard container for elements
Tags
Table of Contents
Properties
- $actionButtons : mixed
- $actionCell : mixed
- $actionsContainer : mixed
- $children : mixed
- $client_validation : mixed
- $currentRow : mixed
- $element : mixed
- $fieldPositions : mixed
- $fields : mixed
- $fieldsByRow : mixed
- $hasAction : mixed
- $inputRows : mixed
- $js_function : mixed
- $name : mixed
- $silent_fields : mixed
- $table : mixed
- $titleCell : mixed
- $virtual_property : mixed
- $forms : mixed
Methods
- __construct() : mixed
- Class Constructor
- __set() : mixed
- Intercepts whenever someones assign a new property's value
- add() : mixed
- Add a container to the form (usually a table or panel)
- addField() : mixed
- Add a Form Field
- addQuickAction() : mixed
- Add a form action
- addQuickButton() : mixed
- Add a form button
- addQuickField() : mixed
- Add a form field
- addQuickFields() : mixed
- Add a form field
- addRow() : mixed
- Add a row
- clear() : mixed
- clear the form Data
- delActions() : mixed
- Clear actions row
- delField() : mixed
- Remove a form field
- delFields() : mixed
- Remove all form fields
- detachActionButtons() : mixed
- Detach action buttons
- disableField() : mixed
- Disable the field
- enableField() : mixed
- Enable the field
- getActionButtons() : mixed
- Return an array with action buttons
- getActionsContainer() : mixed
- Returns the actions container
- getChild() : mixed
- Returns the child object
- getContainer() : mixed
- Returns the form container
- getData() : mixed
- Returns the form POST data as an object
- getField() : The
- Returns a form field by its name
- getFields() : array<string|int, mixed>
- Returns an array with the form fields
- getFieldsByRow() : mixed
- Return the fields by row count
- getFormByName() : mixed
- Returns the form object by its name
- getInputRows() : mixed
- Returns the input groups
- getName() : mixed
- Returns the form name
- getTable() : mixed
- Returns the inner table
- getValues() : mixed
- Returns the form start values as an object
- getVirtualProperty() : mixed
- Get Virtual Property
- hideField() : mixed
- pack() : mixed
- Pack a container to the form (usually a table or panel)
- sendData() : mixed
- Send data for a form located in the parent window
- setClientValidation() : mixed
- Turn on/off client validation
- setData() : mixed
- Define the data of the form
- setEditable() : mixed
- Define if the form will be editable
- setFields() : mixed
- Define wich are the form fields
- setFieldsByRow() : mixed
- Define the field quantity per row
- setFormTitle() : mixed
- Add a form title
- setName() : mixed
- Define the form name
- setProperty() : mixed
- Define a form property
- setTagName() : mixed
- Change tag name
- setVirtualProperty() : mixed
- Set Virtual Property
- show() : mixed
- Shows the form at the screen
- showField() : mixed
- silentField() : mixed
- Silent field
- unsetProperty() : mixed
- Unset form property
- validate() : mixed
- Validate form
Properties
$actionButtons
protected
mixed
$actionButtons
$actionCell
protected
mixed
$actionCell
$actionsContainer
protected
mixed
$actionsContainer
$children
protected
mixed
$children
$client_validation
protected
mixed
$client_validation
$currentRow
protected
mixed
$currentRow
$element
protected
mixed
$element
$fieldPositions
protected
mixed
$fieldPositions
$fields
protected
mixed
$fields
$fieldsByRow
protected
mixed
$fieldsByRow
$hasAction
protected
mixed
$hasAction
$inputRows
protected
mixed
$inputRows
$js_function
protected
mixed
$js_function
$name
protected
mixed
$name
$silent_fields
protected
mixed
$silent_fields
$table
protected
mixed
$table
$titleCell
protected
mixed
$titleCell
$virtual_property
protected
mixed
$virtual_property
$forms
private
static mixed
$forms
Methods
__construct()
Class Constructor
public
__construct([mixed $name = 'my_form' ]) : mixed
Parameters
- $name : mixed = 'my_form'
-
Form Name
__set()
Intercepts whenever someones assign a new property's value
public
__set(mixed $name, mixed $value) : mixed
Parameters
- $name : mixed
-
Property Name
- $value : mixed
-
Property Value
add()
Add a container to the form (usually a table or panel)
public
add(mixed $object[, mixed $is_field = false ]) : mixed
Parameters
- $object : mixed
-
Any Object that implements the show() method
- $is_field : mixed = false
addField()
Add a Form Field
public
addField(mixed $field) : mixed
Parameters
- $field : mixed
-
Object
addQuickAction()
Add a form action
public
addQuickAction(mixed $label, mixed $action[, mixed $icon = 'fa:save' ]) : mixed
Parameters
- $label : mixed
-
Action Label
- $action : mixed
-
TAction Object
- $icon : mixed = 'fa:save'
-
Action Icon
addQuickButton()
Add a form button
public
addQuickButton(mixed $label, mixed $action[, mixed $icon = 'fa:save' ]) : mixed
Parameters
- $label : mixed
-
Action Label
- $action : mixed
-
Javascript action
- $icon : mixed = 'fa:save'
-
Action Icon
addQuickField()
Add a form field
public
addQuickField(mixed $label, mixed $object[, mixed $size = 200 ][, mixed $validator = NULL ][, mixed $label_size = NULL ]) : mixed
Parameters
- $label : mixed
-
Field Label
- $object : mixed
-
Field Object
- $size : mixed = 200
-
Field Size
- $validator : mixed = NULL
-
Field Validator
- $label_size : mixed = NULL
addQuickFields()
Add a form field
public
addQuickFields(mixed $label, mixed $objects[, mixed $required = FALSE ]) : mixed
Parameters
- $label : mixed
-
Field Label
- $objects : mixed
-
Array of Objects
- $required : mixed = FALSE
-
Boolean TRUE if required
addRow()
Add a row
public
addRow() : mixed
clear()
clear the form Data
public
clear([mixed $keepDefaults = FALSE ]) : mixed
Parameters
- $keepDefaults : mixed = FALSE
delActions()
Clear actions row
public
delActions() : mixed
delField()
Remove a form field
public
delField(mixed $field) : mixed
Parameters
- $field : mixed
-
Object
delFields()
Remove all form fields
public
delFields() : mixed
detachActionButtons()
Detach action buttons
public
detachActionButtons() : mixed
disableField()
Disable the field
public
static disableField(mixed $form_name, mixed $field[, mixed $timeout = null ]) : mixed
Parameters
- $form_name : mixed
-
Form name
- $field : mixed
-
Field name
- $timeout : mixed = null
enableField()
Enable the field
public
static enableField(mixed $form_name, mixed $field[, mixed $timeout = null ]) : mixed
Parameters
- $form_name : mixed
-
Form name
- $field : mixed
-
Field name
- $timeout : mixed = null
getActionButtons()
Return an array with action buttons
public
getActionButtons() : mixed
getActionsContainer()
Returns the actions container
public
getActionsContainer() : mixed
getChild()
Returns the child object
public
getChild() : mixed
getContainer()
Returns the form container
public
getContainer() : mixed
getData()
Returns the form POST data as an object
public
getData([mixed $class = 'StdClass' ]) : mixed
Parameters
- $class : mixed = 'StdClass'
-
A string containing the class for the returning object
getField()
Returns a form field by its name
public
getField(mixed $name) : The
Parameters
- $name : mixed
-
A string containing the field's name
Return values
The —Field object
getFields()
Returns an array with the form fields
public
getFields() : array<string|int, mixed>
Return values
array<string|int, mixed> —of form fields
getFieldsByRow()
Return the fields by row count
public
getFieldsByRow() : mixed
getFormByName()
Returns the form object by its name
public
static getFormByName(mixed $name) : mixed
Parameters
- $name : mixed
getInputRows()
Returns the input groups
public
getInputRows() : mixed
getName()
Returns the form name
public
getName() : mixed
getTable()
Returns the inner table
public
getTable() : mixed
getValues()
Returns the form start values as an object
public
getValues([mixed $class = 'StdClass' ][, mixed $withOptions = false ]) : mixed
Parameters
- $class : mixed = 'StdClass'
-
A string containing the class for the returning object
- $withOptions : mixed = false
getVirtualProperty()
Get Virtual Property
public
getVirtualProperty(mixed $name) : mixed
Parameters
- $name : mixed
hideField()
public
static hideField(mixed $form, mixed $field[, mixed $speed = 0 ]) : mixed
Parameters
- $form : mixed
- $field : mixed
- $speed : mixed = 0
pack()
Pack a container to the form (usually a table or panel)
public
pack() : mixed
sendData()
Send data for a form located in the parent window
public
static sendData(mixed $form_name, mixed $object[, mixed $aggregate = FALSE ][, mixed $fireEvents = TRUE ][, mixed $timeout = 0 ]) : mixed
Parameters
- $form_name : mixed
-
Form Name
- $object : mixed
-
An Object containing the form data
- $aggregate : mixed = FALSE
- $fireEvents : mixed = TRUE
- $timeout : mixed = 0
setClientValidation()
Turn on/off client validation
public
setClientValidation(mixed $bool) : mixed
Parameters
- $bool : mixed
setData()
Define the data of the form
public
setData(mixed $object) : mixed
Parameters
- $object : mixed
-
An Active Record object
setEditable()
Define if the form will be editable
public
setEditable(mixed $bool) : mixed
Parameters
- $bool : mixed
-
A Boolean
setFields()
Define wich are the form fields
public
setFields(mixed $fields) : mixed
Parameters
- $fields : mixed
-
An array containing a collection of TField objects
setFieldsByRow()
Define the field quantity per row
public
setFieldsByRow(mixed $count) : mixed
Parameters
- $count : mixed
-
Field count
setFormTitle()
Add a form title
public
setFormTitle(mixed $title) : mixed
Parameters
- $title : mixed
-
Form title
setName()
Define the form name
public
setName(mixed $name) : mixed
Parameters
- $name : mixed
-
A string containing the form name
setProperty()
Define a form property
public
setProperty(mixed $name, mixed $value[, mixed $replace = TRUE ]) : mixed
Parameters
- $name : mixed
-
Property Name
- $value : mixed
-
Property Value
- $replace : mixed = TRUE
setTagName()
Change tag name
public
setTagName(mixed $name) : mixed
Parameters
- $name : mixed
setVirtualProperty()
Set Virtual Property
public
setVirtualProperty(mixed $name, mixed $value) : mixed
Parameters
- $name : mixed
- $value : mixed
show()
Shows the form at the screen
public
show() : mixed
showField()
public
static showField(mixed $form, mixed $field[, mixed $speed = 0 ]) : mixed
Parameters
- $form : mixed
- $field : mixed
- $speed : mixed = 0
silentField()
Silent field
public
silentField(mixed $name) : mixed
Parameters
- $name : mixed
unsetProperty()
Unset form property
public
unsetProperty(mixed $name) : mixed
Parameters
- $name : mixed
validate()
Validate form
public
validate() : mixed