Properties

$loadCityData

$loadCityData : boolean

三级联动 加载省市数据

Type

boolean

$loadCityAreaData

$loadCityAreaData : boolean

三级联动 加载省市区数据

Type

boolean

$components

$components : array

Type

array

$fields

$fields : array

Type

array

$script

$script : array

Type

array

$successScript

$successScript : string

Type

string

$title

$title : string

网页标题

Type

string

$action

$action : string

提交地址

Type

string

$method

$method : string

提交方式

Type

string

$config

$config : array|mixed

表单配置

Type

array|mixed

Methods

frame()

frame(  $field,   $title,   $src, string  $value = '', string  $type = \FormBuilder\components\Frame::TYPE_INPUT) : \FormBuilder\components\Frame

Parameters

$field
$title
$src
string $value
string $type

Returns

\FormBuilder\components\Frame

frameInputs()

frameInputs(  $field,   $title,   $src, array  $value = array()) : \FormBuilder\components\Frame

Parameters

$field
$title
$src
array $value

Returns

\FormBuilder\components\Frame

frameFiles()

frameFiles(  $field,   $title,   $src, array  $value = array()) : \FormBuilder\components\Frame

Parameters

$field
$title
$src
array $value

Returns

\FormBuilder\components\Frame

frameImages()

frameImages(  $field,   $title,   $src, array  $value = array()) : \FormBuilder\components\Frame

Parameters

$field
$title
$src
array $value

Returns

\FormBuilder\components\Frame

frameInputOne()

frameInputOne(  $field,   $title,   $src, string  $value = '') : \FormBuilder\components\Frame

Parameters

$field
$title
$src
string $value

Returns

\FormBuilder\components\Frame

frameFileOne()

frameFileOne(  $field,   $title,   $src, string  $value = '') : \FormBuilder\components\Frame

Parameters

$field
$title
$src
string $value

Returns

\FormBuilder\components\Frame

frameImageOne()

frameImageOne(  $field,   $title,   $src, string  $value = '') : \FormBuilder\components\Frame

Parameters

$field
$title
$src
string $value

Returns

\FormBuilder\components\Frame

radio()

radio(  $field,   $title, string  $value = '') : \FormBuilder\components\Radio

Parameters

$field
$title
string $value

Returns

\FormBuilder\components\Radio

rate()

rate(  $field,   $title, \FormBuilder\traits\form\number  $value) : \FormBuilder\components\Rate

Parameters

$field
$title
\FormBuilder\traits\form\number $value

Returns

\FormBuilder\components\Rate

select()

select(  $field,   $title, string  $value = '') : \FormBuilder\components\Select

Parameters

$field
$title
string $value

Returns

\FormBuilder\components\Select

selectMultiple()

selectMultiple(  $field,   $title, array  $value = array()) : \FormBuilder\components\Select

Parameters

$field
$title
array $value

Returns

\FormBuilder\components\Select

selectOne()

selectOne(  $field,   $title, string  $value = '') : \FormBuilder\components\Select

Parameters

$field
$title
string $value

Returns

\FormBuilder\components\Select

switches()

switches(  $field,   $title, string  $value = '0') : \FormBuilder\components\Switches

Parameters

$field
$title
string $value

Returns

\FormBuilder\components\Switches

upload()

upload(  $field,   $title,   $action, string  $value = '', string  $type = \FormBuilder\components\Upload::TYPE_FILE) : \FormBuilder\components\Upload

Parameters

$field
$title
$action
string $value
string $type

Returns

\FormBuilder\components\Upload

uploadImages()

uploadImages(  $field,   $title,   $action, array  $value = array()) : \FormBuilder\components\Upload

Parameters

$field
$title
$action
array $value

Returns

\FormBuilder\components\Upload

uploadFiles()

uploadFiles(  $field,   $title,   $action, array  $value = array()) : \FormBuilder\components\Upload

Parameters

$field
$title
$action
array $value

Returns

\FormBuilder\components\Upload

uploadImageOne()

uploadImageOne(  $field,   $title,   $action, string  $value = '') : \FormBuilder\components\Upload

Parameters

$field
$title
$action
string $value

Returns

\FormBuilder\components\Upload

uploadFileOne()

uploadFileOne(  $field,   $title,   $action, string  $value = '') : \FormBuilder\components\Upload

Parameters

$field
$title
$action
string $value

Returns

\FormBuilder\components\Upload

checkbox()

checkbox(  $field,   $title, array  $value = array()) : \FormBuilder\components\Checkbox

Parameters

$field
$title
array $value

Returns

\FormBuilder\components\Checkbox

datePicker()

datePicker(  $field,   $title, string  $value = '', string  $type = \FormBuilder\components\DatePicker::TYPE_DATE) : \FormBuilder\components\DatePicker

Parameters

$field
$title
string $value
string $type

Returns

\FormBuilder\components\DatePicker

dateRange()

dateRange(  $field,   $title, string  $startDate = '', string  $endDate = '') : \FormBuilder\components\DatePicker

Parameters

$field
$title
string $startDate
string $endDate

Returns

\FormBuilder\components\DatePicker

dateTime()

dateTime(  $field,   $title, string  $value = '') : \FormBuilder\components\DatePicker

Parameters

$field
$title
string $value

Returns

\FormBuilder\components\DatePicker

dateTimeRange()

dateTimeRange(  $field,   $title, string  $startDate = '', string  $endDate = '') : \FormBuilder\components\DatePicker

Parameters

$field
$title
string $startDate
string $endDate

Returns

\FormBuilder\components\DatePicker

month()

month(  $field,   $title, string  $value = '') : \FormBuilder\components\DatePicker

Parameters

$field
$title
string $value

Returns

\FormBuilder\components\DatePicker

input()

input(  $field,   $title, string  $value = '', string  $type = \FormBuilder\components\Input::TYPE_TEXT) : \FormBuilder\components\Input

获取input组件

Parameters

$field
$title
string $value
string $type

Returns

\FormBuilder\components\Input

text()

text(  $field,   $title, string  $value = '') : \FormBuilder\components\Input

Parameters

$field
$title
string $value

Returns

\FormBuilder\components\Input

password()

password(  $field,   $title, string  $value = '') : \FormBuilder\components\Input

Parameters

$field
$title
string $value

Returns

\FormBuilder\components\Input

textarea()

textarea(  $field,   $title, string  $value = '') : \FormBuilder\components\Input

Parameters

$field
$title
string $value

Returns

\FormBuilder\components\Input

url()

url(  $field,   $title, string  $value = '') : \FormBuilder\components\Input

Parameters

$field
$title
string $value

Returns

\FormBuilder\components\Input

email()

email(  $field,   $title, string  $value = '') : \FormBuilder\components\Input

Parameters

$field
$title
string $value

Returns

\FormBuilder\components\Input

idate()

idate(  $field,   $title, string  $value = '') : \FormBuilder\components\Input

Parameters

$field
$title
string $value

Returns

\FormBuilder\components\Input

slider()

slider(  $field,   $title, integer  $value) : \FormBuilder\components\Slider

Parameters

$field
$title
integer $value

Returns

\FormBuilder\components\Slider

sliderRange()

sliderRange(  $field,   $title, integer  $start, integer  $end) : \FormBuilder\components\Slider

Parameters

$field
$title
integer $start
integer $end

Returns

\FormBuilder\components\Slider

cascader()

cascader(  $field,   $title, array  $value = array(), string  $type = \FormBuilder\components\Cascader::TYPE_OTHER) : \FormBuilder\components\Cascader

多级联动组件

Parameters

$field
$title
array $value
string $type

Returns

\FormBuilder\components\Cascader

city()

city(  $field,   $title, array|string  $province = array(), string  $city = '') : \FormBuilder\components\Cascader

省市二级联动

Parameters

$field
$title
array|string $province
string $city

Returns

\FormBuilder\components\Cascader

cityArea()

cityArea(  $field,   $title, array|string  $province = array(), string  $city = '', string  $area = '') : \FormBuilder\components\Cascader

省市区三级联动

Parameters

$field
$title
array|string $province
string $city
string $area

Returns

\FormBuilder\components\Cascader

timePicker()

timePicker(  $field,   $title, string  $value = '', string  $type = \FormBuilder\components\TimePicker::TYPE_TIME) : \FormBuilder\components\TimePicker

Parameters

$field
$title
string $value
string $type

Returns

\FormBuilder\components\TimePicker

timeRange()

timeRange(  $field,   $title, string  $startTime = '', string  $endTime = '') : \FormBuilder\components\TimePicker

Parameters

$field
$title
string $startTime
string $endTime

Returns

\FormBuilder\components\TimePicker

tree()

tree(  $field,   $title, array  $value = array(), string  $type = \FormBuilder\components\Tree::TYPE_CHECKED) : \FormBuilder\components\Tree

Parameters

$field
$title
array $value
string $type

Returns

\FormBuilder\components\Tree

treeSelected()

treeSelected(  $field,   $title, array  $value = array()) : \FormBuilder\components\Tree

Parameters

$field
$title
array $value

Returns

\FormBuilder\components\Tree

treeChecked()

treeChecked(  $field,   $title, array  $value = array()) : \FormBuilder\components\Tree

Parameters

$field
$title
array $value

Returns

\FormBuilder\components\Tree

treeData()

treeData(  $id,   $title, array  $children = array()) : \FormBuilder\components\TreeData

Parameters

$id
$title
array $children

Returns

\FormBuilder\components\TreeData

row()

row(integer  $gutter, string  $type = '', string  $align = '', string  $justify = '', string  $className = '') : \FormBuilder\components\Row

Parameters

integer $gutter
string $type
string $align
string $justify
string $className

Returns

\FormBuilder\components\Row

style()

style(boolean  $inline = false, string  $labelPosition = 'right', integer  $labelWidth = 125, boolean  $showMessage = true, string  $autocomplete = 'off') : \FormBuilder\components\FormStyle

Parameters

boolean $inline
string $labelPosition
integer $labelWidth
boolean $showMessage
string $autocomplete

Returns

\FormBuilder\components\FormStyle

option()

option(  $value, string  $label = '', boolean  $disabled = false) : \FormBuilder\components\Option

Parameters

$value
string $label
boolean $disabled

Returns

\FormBuilder\components\Option

__construct()

__construct(string  $action, array  $components = array()) 

Form constructor.

Parameters

string $action

提交地址

array $components

组件

components()

components(array  $components = array()) : $this

Parameters

array $components

Returns

$this

getSuccessScript()

getSuccessScript() : string

Returns

string

setSuccessScript()

setSuccessScript(string  $successScript) : $this

表单提交后成功执行的js地址 formCreate.formSuccess(formData,$f)

Parameters

string $successScript

Returns

$this

getAction()

getAction() : string

Returns

string

setAction()

setAction(string  $action) : $this

提交地址

Parameters

string $action

Returns

$this

getMethod()

getMethod() : string

Returns

string

getConfig()

getConfig(string  $key = '') : array|mixed|null

Parameters

string $key

Returns

array|mixed|null

setMethod()

setMethod(string  $method) : $this

提交方式

Parameters

string $method

Returns

$this

getTitle()

getTitle() : string

标题

Returns

string

setTitle()

setTitle(string  $title) : $this

Parameters

string $title

Returns

$this

prepend()

prepend(\FormBuilder\FormComponentDriver  $component) : $this

开头插入组件

Parameters

\FormBuilder\FormComponentDriver $component

Returns

$this

getRules()

getRules() : array

获得表单规则

Returns

array

view()

view() : string

获取表单视图

Returns

string

script()

script() : array

获取表单生成器所需全部js

Returns

array

formScript()

formScript() : string

获取生成表单的js代码

Returns

string

getScript()

getScript() : array

获取表单生成器所需js

Returns

array

create()

create(  $action, array  $components = array()) : \FormBuilder\Form

生成表单快捷方法

Parameters

$action
array $components

Returns

\FormBuilder\Form