FormDisplay
class FormDisplay (View source)
Form management class, displays and processes forms
Methods
getConfigFile()
Returns ConfigFile associated with this instance
void
registerForm(string $formName, array $form, int|null $serverId = null)
Registers form in form manager
bool
process(bool $allowPartialSave = true, bool $checkFormSubmit = true)
Processes forms, returns true on successful save
string
getDisplay(bool $showButtons = true, string|null $formAction = null, array|null $hiddenFields = null)
Outputs HTML for forms
string
displayErrors()
Displays errors
void
fixErrors()
Reverts erroneous fields to their default values
bool
save(array $forms, bool $allowPartialSave = true)
Validates and saves form data to session
bool
hasErrors()
Tells whether form validation failed
string
getDocLink(string $path)
Returns link to documentation
Details
__construct(ConfigFile $configFile)
No description
ConfigFile
getConfigFile()
Returns ConfigFile associated with this instance
void
registerForm(string $formName, array $form, int|null $serverId = null)
Registers form in form manager
bool
process(bool $allowPartialSave = true, bool $checkFormSubmit = true)
Processes forms, returns true on successful save
string
getDisplay(bool $showButtons = true, string|null $formAction = null, array|null $hiddenFields = null)
Outputs HTML for forms
string
displayErrors()
Displays errors
void
fixErrors()
Reverts erroneous fields to their default values
bool
save(array $forms, bool $allowPartialSave = true)
Validates and saves form data to session
bool
hasErrors()
Tells whether form validation failed
string
getDocLink(string $path)
Returns link to documentation