FormBuilderMain::form()
Convert given value to FormBuilderForm if it isn’t already
Throws FormBuilderException if given value cannot be converted to a FormBuilderForm
Usage
// basic usage
$formBuilderForm = $formBuilderMain->form($form);
// usage with all arguments
$formBuilderForm = $formBuilderMain->form($form, bool $throw = true);
Arguments
Name | Type(s) | Description |
---|---|---|
$form | FormBuilderForm InputfieldForm string int | |
$throw (optional) | bool | Throw exception if form not found? If false, method returns false rather than throwing Exception Default:true |
Return value
FormBuilderForm
bool
Exceptions
Method can throw exceptions on error:
FormBuilderException
FormBuilderMain methods and properties
API reference based on ProcessWire core version 3.0.251