FormBuilder: Main

Provides the capability to build, edit and embed forms on your ProcessWire-powered web site.

When possible, please use the main FormBuilder class ($forms var) instead as this class will eventually be removed.


Click any linked item for full usage details and examples. Hookable methods are indicated with the icon.

Show class?     Show args?       Only hookable?    

Common

NameReturnSummary 
FormBuilderMain::addNew(string $formName)
FormBuilderFormAdd a new form with the given name 
FormBuilderMain::count()
NoneReturn number of forms here, per Countable interface 
FormBuilderMain::countEntries($form)
intReturn the number of entries for the given form ID 
FormBuilderMain::delete(FormBuilderForm $form)
boolDelete the given form 
FormBuilderMain::entryToForm($entry)
bool FormBuilderFormGiven an entry array or ID return the FormBuilderForm object that it belongs to 
FormBuilderMain::error(string $str)
NoneError message 
FormBuilderMain::exportJSON($id)
stringReturn the JSON schema for the given form ID 
FormBuilderMain::findEntries(string $keywords)
arrayFind form entries across all forms (or on specific form if specified) 
FormBuilderMain::form($form)
FormBuilderForm boolConvert given value to FormBuilderForm if it isn’t already 
FormBuilderMain::formID($formID)
intConvert given value to form ID if is isn’t already 
FormBuilderMain::formName($formName)
intConvert given value to form name if is isn’t already 
FormBuilderMain::forms()
FormBuilder@return FormBuilder 
FormBuilderMain::frameworksPath()
stringReturn the path where frameworks are stored 
FormBuilderMain::frameworksURL()
stringReturn the URL where frameworks are stored 
FormBuilderMain::get($key)
FormBuilderForm nullRetrieve a form (alias of load) 
FormBuilderMain::getDatabase()
PDO WireDatabasePDOGet the $database API var 
FormBuilderMain::getEmbedVersion()
None 
FormBuilderMain::getEntry(int $entryID)
array boolGet a form entry by ID 
FormBuilderMain::getFileFromKey(string $key)
bool stringRetrieve a filename from a transportable key 
FormBuilderMain::getFileKey($formID, int $entryID, string $filename)
bool stringGenerate a transportable key for the given filename within a form and entry 
FormBuilderMain::getFilePath($form, int $entryID, string $filename)
boolGet full disk path for given file basename 
FormBuilderMain::getFileURL($formID, int $entryID, string $filename)
bool stringReturn a URL where the given file can be viewed 
FormBuilderMain::getFilesPath()
stringReturn path that FormBuilder uses for storing files 
FormBuilderMain::getFormNames()
array stringGet names for all forms indexed by id 
FormBuilderMain::getFramework($form)
FormBuilderFramework nullGet the framework used by the given $form 
FormBuilderMain::getHelpers($for)
arrayGet all 'themes' or 'frameworks' files 
FormBuilderMain::getIterator()
ArrayObjectMake this module iterable, as required by the IteratorAggregate interface 
FormBuilderMain::helperPath(string $for)
stringGet path for 'themes' or 'frameworks' helpers 
FormBuilderMain::helperURL(string $for)
stringGet URL for 'themes' or 'frameworks' helpers 
FormBuilderMain::importJSON($id, string $json)
boolImport the given JSON schema for the given form 
FormBuilderMain::isForm($id)
boolGiven a form ID or name, returns true if is used by a form, false if not 
FormBuilderMain::isReservedName(string $name)
boolReturns whether or not the given $name may be used or a form or field name 
FormBuilderMain::isValidLicense()
boolReturns whether the given license key is valid for the domain its running on 
FormBuilderMain::load($id)
FormBuilderForm array nullRetrieve a form by $id or $name or boolean true to return all forms 
FormBuilderMain::parseFilesPath(string $path)
stringGiven a path with a potential {config.paths.$key} in it, parse it to an actual runtime path 
FormBuilderMain::save(FormBuilderForm $form)
boolSave the given $form 
FormBuilderMain::saveEntry(array $entry)
bool intSave a form entry 
FormBuilderMain::themesPath()
stringReturn the path where themes are stored 
FormBuilderMain::themesURL()
stringReturn the URL where themes are stored 
FormBuilderMain::viewFile(string $key)
boolOutputs the given file, must be located under getFilesPath() 
FormBuilderMain::wire()
ProcessWire Wire nullProcessWire API access 

API reference based on ProcessWire core version 3.0.251