HTML Form tag generation
package | salt\view |
---|
end() : string
string
HTML end form tagfield(\salt\Field $field, string $name, mixed $value, array<mixed,string> $classes= array()
, array<mixed,mixed> $others= array()
, \salt\ViewHelper $helper= NULL
) : string
For a HTML tag of an existing DAO object, use $dao->FORM->$field instead
\salt\Field
the field
string
name of the HTML tag, can be NULL for use the $field->name
mixed
Have to be in DAO format (timestamp for date, TRUE/FALSE for boolean, etc...)
array<mixed,string>
CSS classes. Each element can contains multiple classes separated by space
array<mixed,mixed>
others HTML attributes : key=>value
\salt\ViewHelper
The helper to use for format the value
string
HTML tag for the fieldget(string $action= NULL
, array<mixed,mixed> $params= array()
, array<mixed,mixed> $others= array()
) : string
string
Page to send form, NULL for reuse current page
array<mixed,mixed>
List of parameters to add in hidden input. Can be name => value or just name for reusing value in current query.
If name is "*", all parameters in current query are reused.
Example : array('a', 'b'=>2, 'c'=>3) with query a=0&b=1&d=4 will produce hidden inputs :
array<mixed,mixed>
Other attributes to add in form tag
string
HTML form taginput(string $name, string $type= 'text'
, string $value= NULL
, array<mixed,string> $classes= array()
, array<mixed,mixed> $others= array()
) : string
string
name of the tag
string
value of type attribute
string
value of the tag
array<mixed,string>
CSS classes of the tag
array<mixed,mixed>
all other attributes for the tag
string
HTML text tagpost(string $action= NULL
, array<mixed,mixed> $params= array()
, array<mixed,mixed> $others= array()
) : string
string
Page to send form, NULL for reuse current page
array<mixed,mixed>
List of parameters to add in method URL. Can be name => value or just name for reusing value in current query.
If name is "*", all parameters in current query are reused.
Example : array('a', 'b'=>2, 'c'=>3) with query a=0&b=1&d=4 will produce method="...?a=0&b=2&c=3"
array<mixed,mixed>
Other attributes to add in form tag
string
HTML form tagradio(string $name, string $options, string $value= NULL
, array<mixed,string> $classes= array()
, array<mixed,mixed> $others= array()
) : array<mixed,string>
string
name of the tag
string
all possible values key=>value
string
value of the tag
array<mixed,string>
CSS classes of the tag
array<mixed,mixed>
all other attributes for the tag
array<mixed,string>
HTML text tagselect(string $name, string $options, string $value= NULL
, array<mixed,string> $classes= array()
, array<mixed,mixed> $others= array()
) : string
string
name of the tag
string
all possible values key=>value
string
value of the tag
array<mixed,string>
CSS classes of the tag
array<mixed,mixed>
all other attributes for the tag
string
HTML text tagtextarea(string $name, string $value= NULL
, array<mixed,string> $classes= array()
, array<mixed,mixed> $others= array()
) : string
string
name of the tag
string
value of the tag
array<mixed,string>
CSS classes of the tag
array<mixed,mixed>
all other attributes for the tag
string
HTML text tagwithJQueryUI(boolean $value = TRUE
)
boolean
TRUE (default) for enable JQueryUI, false for disable
withNameContainer(string $name)
string
... $name all names containers : (a, b, c) will give a[b][c][component_name]
withoutNameContainer()
HTMLtag(string $tagName, array $attributes, string $content= NULL
, integer $tagType= self::TAG_FULL
) : string
string
name of the HTML tag
array
attributes of the tag
string
content of tag : Have to be an escaped HTML String
integer
type of tag : self::TAG_*
string
HTML tagcommonTagAttributes(string $name, string $value, array<mixed,string> $classes, array<mixed,mixed> $attrs) : array<mixed,mixed>
string
name of the tag
string
value of the tag
array<mixed,string>
array of CSS classes, each element can contain multiple classes separated by spaces
array<mixed,mixed>
all others attributes : key=>value
array<mixed,mixed>
attributes to use in tag : key=>valuegetName(string $name) : string
string
simple tag/field name
string
$name or $name in template if we use withNameContainer()getValue(string $name) : mixed
string
name of input
\salt\SaltException |
if called outside a form |
---|
mixed
value in GET/POST for this nameparseParams(string $query, array<mixed,string> $params) : array<mixed,string>
string
Query of URL in QUERY_STRING format : var1=value1&var2=value2...
array<mixed,string>
List of varX to keep or redefine. '*' for reuse all request parameters, key=>NULL for remove key parameter
array<mixed,string>
key=>value$method : string
NULL
$nameContainer : string
NULL
$values : array<mixed,mixed>
NULL
content | if nameContainer is used, contains GET/POST values that are resolved early for retrieve form values. |
---|
$withJQueryUI : boolean
TRUE
PARAM_RAW_VALUE = '_saltRawValue'
TAG_CLOSE = 2
TAG_FULL = 0
TAG_OPEN = 1