Jelix 1.6.40

HtmlBuilder extends BuilderBase
in package

Main HTML form builder

Table of Contents

$_action  : string
the action selector
$_actionParams  : array<string|int, mixed>
params for the action
$_endt  : mixed
$_form  : jFormsBase
a form object
$_name  : mixed
form name
$defaultPluginsConf  : array<string|int, mixed>
$formConfig  : mixed
$formType  : mixed
$htmlFormAttributes  : array<string|int, mixed>
$htmlWidgetsAttributes  : array<string|int, mixed>
$jFormsJsVarName  : mixed
$options  : array<string|int, mixed>
$pluginsConf  : array<string|int, mixed>
$rootWidget  : RootWidget
$widgets  : mixed
__construct()  : mixed
endOfTag()  : mixed
escJsStr()  : mixed
getForm()  : mixed
getjFormsJsVarName()  : mixed
getName()  : mixed
getOption()  : mixed
getWidget()  : WidgetBase
outputAllControls()  : mixed
displays all the form. outputMetaContent, outputHeader and outputFooters are also called
outputControl()  : mixed
displays the content corresponding of the given control
outputControlHelp()  : mixed
outputControlLabel()  : mixed
displays the label corresponding of the given control
outputControlValue()  : mixed
displays the value of the control (without the control)
outputFooter()  : mixed
output the footer content of the form
outputHeader()  : mixed
output the header content of the form
outputMetaContent()  : mixed
called during the meta content processing in templates This method should set things on the response, like adding css styles, javascript links etc.
setAction()  : mixed
setOptions()  : mixed
set options
_outputAttr()  : mixed
generateFormName()  : mixed
generates a name for the form
outputErrors()  : mixed

Properties

$_action

the action selector

protected string $_action

$_actionParams

params for the action

protected array<string|int, mixed> $_actionParams = array()

$defaultPluginsConf

protected array<string|int, mixed> $defaultPluginsConf = array()

define default plugins for each formwidget

$formConfig

protected mixed $formConfig = 'jforms_builder_html'

$htmlFormAttributes

protected array<string|int, mixed> $htmlFormAttributes = array()

list of default html attributes to set on the form element

$htmlWidgetsAttributes

protected array<string|int, mixed> $htmlWidgetsAttributes = array()

list of attributes for each type of widgets. Keys are widgets type.

$jFormsJsVarName

protected mixed $jFormsJsVarName = 'jForms'

$options

protected array<string|int, mixed> $options = array()

options for the builder

$pluginsConf

protected array<string|int, mixed> $pluginsConf = array()

define plugins for each formwidget for the current builder

Methods

__construct()

public __construct(mixed $form) : mixed
Parameters
$form : mixed

a form object

Return values
mixed

endOfTag()

public endOfTag() : mixed
Return values
mixed

escJsStr()

public escJsStr(mixed $str) : mixed
Parameters
$str : mixed
Return values
mixed

getForm()

public getForm() : mixed
Return values
mixed

getjFormsJsVarName()

public getjFormsJsVarName() : mixed
Return values
mixed

getName()

public getName() : mixed
Return values
mixed

getOption()

public getOption(string $name) : mixed
Parameters
$name : string

name of an option

Return values
mixed

the value of the option

outputAllControls()

displays all the form. outputMetaContent, outputHeader and outputFooters are also called

public outputAllControls() : mixed
Return values
mixed

outputControl()

displays the content corresponding of the given control

public outputControl(mixed $ctrl[, mixed $attributes = array() ]) : mixed
Parameters
$ctrl : mixed

the control to display

$attributes : mixed = array()

attribute to add on the generated code (html attributes for example)

Return values
mixed

outputControlLabel()

displays the label corresponding of the given control

public outputControlLabel(mixed $ctrl[, mixed $format = '' ][, mixed $editMode = true ]) : mixed
Parameters
$ctrl : mixed

the control to display

$format : mixed = ''
$editMode : mixed = true
Return values
mixed

outputControlValue()

displays the value of the control (without the control)

public outputControlValue(mixed $ctrl[, mixed $attributes = array() ]) : mixed
Parameters
$ctrl : mixed

the control to display

$attributes : mixed = array()

attribute to add on the generated code (html attributes for example)

Return values
mixed

outputFooter()

output the footer content of the form

public outputFooter() : mixed
Return values
mixed

outputHeader()

output the header content of the form

public outputHeader() : mixed
Return values
mixed

outputMetaContent()

called during the meta content processing in templates This method should set things on the response, like adding css styles, javascript links etc.

public outputMetaContent(mixed $t) : mixed
Parameters
$t : mixed
Return values
mixed

setAction()

public setAction(string $action, array<string|int, mixed> $actionParams) : mixed
Parameters
$action : string

action selector where form will be submit

$actionParams : array<string|int, mixed>

parameters for the action

Return values
mixed

setOptions()

set options

public setOptions(array<string|int, mixed> $options) : mixed
Parameters
$options : array<string|int, mixed>

some parameters

  • "errDecorator"=>"name of your javascript object for error listener"
  • "method" => "post" or "get". default is "post"
  • "plugins" => list of class names for widget. keys are controls refs
  • "attributes" => list of html attributes to put on the form element
  • "widgetsAttributes" => list of attributes for each widget. keys are controls refs
Return values
mixed

_outputAttr()

protected _outputAttr(mixed &$attributes) : mixed
Parameters
$attributes : mixed
Return values
mixed

generateFormName()

generates a name for the form

protected static generateFormName(mixed $sel) : mixed
Parameters
$sel : mixed
Return values
mixed

outputErrors()

protected outputErrors() : mixed
Return values
mixed

Search results