FormBuilderField class
Maintains configuration for a field in a Form Builder form.
Click any linked item for full usage details and examples. Hookable methods are indicated with the icon. In addition to those shown below, the Form class also inherits all the methods and properties of: FormBuilderData.
Retrieval
Manipulation
| Name | Return | Summary | |
|---|---|---|---|
Form Form Form | self | Add a new child as a Form | |
Form Form Form | Form | Add new field by specifying name, type and label | |
Form Form Form | FormBuilderData this | Remove the given child from this form/field | |
Form Form Form | FormBuilderData | Set field name |
Properties
| Name | Return | Summary | |
|---|---|---|---|
| Form | int | Width of this field as a percent between 10 and 100. | |
| Form | string | Default value of this field (if applicable) | |
| Form | string | Optional description of field | |
| Form | FormBuilderForm | Form instance that this filed is connected with | |
| Form | string | Name of the form this field belongs to | |
| Form | string | Label for this field | |
| Form | string | Name of field | |
| Form | string | Optional notes for field | |
| Form | int | Number of children this field has (if this field is a fieldset or form) | |
| Form | Form FormBuilderForm null | Parent of this field | |
| Form | bool | Is this field required? | |
| Form | string | Selector condition when field is required, also requires that 'required' is true. | |
| Form | string | Selector condition of when field is visible. | |
| Form | string | Type of field |
Additional methods and properties
In addition to the methods and properties above, Form
API reference based on ProcessWire core version 3.0.252