Documentation

pm_Form_Simple extends Zend_Form
in package
implements Zend_Validate_Interface

Base form

Tags
see
Zend_Form
since
11.0

Interfaces, Classes and Traits

Zend_Validate_Interface

Table of Contents

DECORATOR  = 'DECORATOR'
ELEMENT  = 'ELEMENT'
ENCTYPE_MULTIPART  = 'multipart/form-data'
ENCTYPE_URLENCODED  = 'application/x-www-form-urlencoded'
METHOD_DELETE  = 'delete'
METHOD_GET  = 'get'
METHOD_POST  = 'post'
METHOD_PUT  = 'put'
__construct()  : mixed
Create a new form
addControlButtons()  : mixed
Add control buttons: Ok and Cancel
addElement()  : Zend_Form
Add a new element
addSubForm()  : Zend_Form
Add a sub form
getElement()  : null|Zend_Form_Element
Retrieve a single element
getId()  : string
Get element id
getSubForm()  : null|Zend_Form
Retrieve a single sub form
getSubForms()  : array<string|int, Zend_Form>
Retrieve all sub forms
getValue()  : mixed
Retrieve value for single element
getValues()  : array<string|int, mixed>
Retrieve all form element values
init()  : void
Initialize form
isValid()  : bool
Validate form
lmsg()  : string
Translate message by key according to current locale
process()  : void
Process form after submit

Constants

DECORATOR

public mixed DECORATOR = 'DECORATOR'

ELEMENT

public mixed ELEMENT = 'ELEMENT'

ENCTYPE_MULTIPART

public mixed ENCTYPE_MULTIPART = 'multipart/form-data'

ENCTYPE_URLENCODED

public mixed ENCTYPE_URLENCODED = 'application/x-www-form-urlencoded'

METHOD_DELETE

public mixed METHOD_DELETE = 'delete'

METHOD_GET

public mixed METHOD_GET = 'get'

METHOD_POST

public mixed METHOD_POST = 'post'

METHOD_PUT

public mixed METHOD_PUT = 'put'

Methods

__construct()

Create a new form

public __construct([mixed|array<string|int, mixed> $options = [] ]) : mixed
Parameters
$options : mixed|array<string|int, mixed> = []

basic Zend_Form options

Tags
see
Zend_Form::__construct
Return values
mixed

addControlButtons()

Add control buttons: Ok and Cancel

public addControlButtons([array<string|int, mixed>|null $params = null ]) : mixed
[
    'sendTitle' => string,
    'sendHidden' => bool,
    'cancelTitle' => string,
    'cancelLink' => string,
    'cancelHidden' => bool,
    'withSeparator' => bool,
    'hideLegend' => bool,
    'presubmitHandler' => string,
]
Parameters
$params : array<string|int, mixed>|null = null
Return values
mixed

addElement()

Add a new element

public addElement(string|Zend_Form_Element $element[, string $name = null ][, array<string|int, mixed>|Zend_Config $options = null ]) : Zend_Form

Basic elements are:

  • Text
  • Password
  • Textarea
  • SimpleText
  • Select
  • Radio
  • Checkbox
  • Hidden

More classes see in CommonPanel\Form\Element and Zend\Form\Element

Parameters
$element : string|Zend_Form_Element
$name : string = null
$options : array<string|int, mixed>|Zend_Config = null
Tags
see
Zend_Form::addElement
Return values
Zend_Form

addSubForm()

Add a sub form

public addSubForm(Zend_Form $form, string $name[, null $order = null ]) : Zend_Form
Parameters
$form : Zend_Form
$name : string
$order : null = null
Return values
Zend_Form

getElement()

Retrieve a single element

public getElement(string $name) : null|Zend_Form_Element
Parameters
$name : string
Return values
null|Zend_Form_Element

getId()

Get element id

public getId() : string
Return values
string

getSubForm()

Retrieve a single sub form

public getSubForm(string $name) : null|Zend_Form
Parameters
$name : string
Return values
null|Zend_Form

getSubForms()

Retrieve all sub forms

public getSubForms() : array<string|int, Zend_Form>
Return values
array<string|int, Zend_Form>

getValue()

Retrieve value for single element

public getValue(string $name) : mixed
Parameters
$name : string
Return values
mixed

getValues()

Retrieve all form element values

public getValues([bool $suppressArrayNotation = false ]) : array<string|int, mixed>
Parameters
$suppressArrayNotation : bool = false
Return values
array<string|int, mixed>

init()

Initialize form

public init() : void
Return values
void

isValid()

Validate form

public isValid(array<string|int, mixed> $data) : bool
Parameters
$data : array<string|int, mixed>
Return values
bool

lmsg()

Translate message by key according to current locale

public lmsg(string $key[, array<string|int, mixed> $params = [] ]) : string
Parameters
$key : string
$params : array<string|int, mixed> = []
Return values
string

process()

Process form after submit

public process() : void
Tags
since
17.0
Return values
void

Search results