\TbForm

TbForm is adaptation of CFrom class for fast form building with bootstrap.

Its public interface does not differs from original CFrom class. Please refer to {@link CFrom} for further information.

Summary

Methods
Properties
Constants
renderButtons()
renderBegin()
renderElement()
$inputElementClass
$buttonElementClass
$activeForm
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Properties

$inputElementClass

$inputElementClass : string

The name of the class for representing a form input element. Defaults to 'TbFormInputElement'.

Type

string

$buttonElementClass

$buttonElementClass : string

The name of the class for representing a form button element. Defaults to 'TbFormButtonElement'.

Type

string

$activeForm

$activeForm : array

The configuration used to create the active form widget.

The widget will be used to render the form tag and the error messages. The 'class' option is required, which specifies the class of the widget. The rest of the options will be passed to {@link CBaseController::beginWidget()} call. Defaults to array('class'=>'TbActiveForm').

Type

array

Methods

renderButtons()

renderButtons() : string

Renders the {@link buttons} in this form.

Returns

string —

The rendering result.

renderBegin()

renderBegin() : string

Renders the open tag of the form. The default implementation will render the open form tag.

Returns

string —

The rendering result.

renderElement()

renderElement(mixed $element) : string

Renders a single element which could be an input element, a sub-form, a string, or a button.

Parameters

mixed $element

The form element to be rendered. This can be either a {@link CFormElement} instance or a string representing the name of the form element.

Returns

string —

The rendering result.