Db_FormElement class
Base class for all form elements
| Property |
Type |
Description |
Defined By |
| collapsable |
boolean |
determines whether the element should be placed to the collapsable form area. |
Db_FormElement |
| noForm |
boolean |
hides the element from forms. |
Db_FormElement |
| noPreview |
boolean |
makes the element invisible in the form preview. |
Db_FormElement |
| sortOrder |
integer |
specifies the element position in a form. |
Db_FormElement |
| tab |
string |
specifies the form tab name. |
Db_FormElement |
| Method |
Description |
Defined By |
| collapsable() |
places the element to the form or tab collapsable area. |
Db_FormElement |
| noForm() |
hides the element from the form. |
Db_FormElement |
| noPreview() |
hides the element from the form preview. |
Db_FormElement |
| sortOrder() |
sets the element position on the form. |
Db_FormElement |
| tab() |
specifies a caption of the tab to place the field to. |
Db_FormElement |
Property details
¶
collapsable property
public boolean $collapsable;
Determines whether the element should be placed to the collapsable form area.
¶
noForm property
public boolean $noForm;
Hides the element from forms.
¶
noPreview property
public boolean $noPreview;
Makes the element invisible in the form preview.
¶
sortOrder property
public integer $sortOrder;
Specifies the element position in a form.
By default this parameter is assigned automatically.
¶
tab property
public string $tab;
Specifies the form tab name.
Method details
¶
collapsable() method
public Db_FormElement collapsable(boolean $value=true)
| $value |
boolean |
determines whether the element should be placed to the collapsable area. |
| {return} |
Db_FormElement |
returns the updated form element object. |
Places the element to the form or tab collapsable area.
¶
noForm() method
public Db_FormElement noForm()
| {return} |
Db_FormElement |
returns the updated form element object. |
Hides the element from the form.
¶
noPreview() method
public Db_FormElement noPreview()
| {return} |
Db_FormElement |
returns the updated form element object. |
Hides the element from the form preview.
¶
sortOrder() method
public Db_FormElement sortOrder(integer $value)
| $value |
integer |
specifies the element sort order. |
| {return} |
Db_FormElement |
returns the updated form element object. |
Sets the element position on the form.
For elements without any position specified, the position is calculated automatically,
basing on the add_form_field() method call order.
The first element sort order value is 10, second's - 20 and so on.
¶
tab() method
public Db_FormElement tab(string $caption)
| $caption |
string |
specifies the tab caption. |
| {return} |
Db_FormElement |
returns the updated form element object. |
Specifies a caption of the tab to place the field to.
If you use tabs, you should call this method for all form field in the model.
|