FormBuilderMain class

Located in file /site/modules/FormBuilder/FormBuilderMain.php

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

Show class?             Show args?        

Common

NameReturnSummary 
FormBuilderMain::addNew(string $formName)
FormBuilderFormAdd a new form with the given name 
FormBuilderMain::count()
(nothing)Return number of forms here, per Countable interface 
FormBuilderMain::countEntries($form)
intReturn the number of entries for the given form ID 
FormBuilderMain::delete($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)
(nothing)Error 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::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()
(nothing) 
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.244

Latest news

  • ProcessWire Weekly #559
    The 559th issue of ProcessWire Weekly brings in all the latest news from the ProcessWire community. Modules, sites, and more. Read on!
    Weekly.pw / 25 January 2025
  • ProcessWire 3.0.244 new main/master version
    ProcessWire 3.0.244 is our newest main/master/stable version. It's been more than a year in the making and is packed with tons of new features, issue fixes, optimizations and more. This post covers all the details.
    Blog / 18 January 2025
  • Subscribe to weekly ProcessWire news

“Indeed, if ProcessWire can be considered as a CMS in its own right, it also offers all the advantages of a CMF (Content Management Framework). Unlike other solutions, the programmer is not forced to follow the proposed model and can integrate his/her ways of doing things.” —Guy Verville, Spiria Digital Inc.