General
__construct
$form = new Form(string $form_ID, string $layout = 'horizontal', string $attr = '', string $framework = 'bs5');
setMode
$form->setMode(string $mode);
setOptions
$form->setOptions($user_options = array());
getOptions
$form->getOptions(mixed $options);
setAction
$form->setAction(string $url, bool $add_get_vars = true);
setLayout
$form->setLayout(string $layout);
setMethod
$form->setMethod(string $method);
startFieldset
$form->startFieldset(string $legend = '', string $fieldset_attr = '', string $legend_attr = '');
endFieldset
$form->endFieldset();
startDependentFields
$form->startDependentFields($parent_field, $show_values[, $inverse = false]);
endDependentFields
$form->endDependentFields();
clear static
Form::clear(string $form_ID);
registerValues static
Form::registerValues(string $form_ID);
mergeValues static
Form::mergeValues(array $form_names_array);
testToken static
Form::testToken(string $form_ID);
validate static
Form::validate(string $form_ID);
Elements
addInput
$form->addInput(string $type, string $name, string $value = '', string $label = '', string $attr = '');
addTextarea
$form->addTextarea(string $name, string $value = '', string $label = '', string $attr = '');
addOption
$form->addOption(string $select_name, string $value, string $txt, string $group_name = '', string $attr = '');
addSelect
$form->addSelect(string $select_name, string $label = '', string $attr = '', bool $displayGroupLabels = true);
addCountrySelect
$form->addCountrySelect(string $select_name, string $label = '', string $attr = '', array $user_options = []);
addTimeSelect
$form->addTimeSelect(string $select_name, string $label = '', string $attr = '', array $user_options = []);
addRadio
$form->addRadio(string $group_name, string $label, string $value, string $attr = '');
printRadioGroup
$form->printRadioGroup(string $group_name, string $label = '', bool $inline = true, string $attr = '');
addCheckbox
$form->addCheckbox(string $group_name, string $label, string $value, string $attr = '');
printCheckboxGroup
$form->printCheckboxGroup(string $group_name, string $label = '', bool $inline = true, string $attr = '');
addBtn
$form->addBtn(string $type, string $name, string $value, string $text, string $attr = '', string $btnGroupName = '')
printBtnGroup
$form->printBtnGroup(string $btnGroupName, string $label = '')
addHtml
$form->addHtml(string $html, string $element_name = '', string $pos = 'after');
Rendering
render
$form->render(bool $debug = false, bool $display = true);
useLoadJs
$form->useLoadJs($bundle = '');
getIncludes
$form->getIncludes(string $type, bool $debug = false);
printIncludes
$form->printIncludes(string $type, bool $debug = false);
getJsCode
$form->printJsCode(bool $debug = false);
printJsCode
$form->printJsCode(bool $debug = false);
Utilities
groupElements
$form->groupElements(string $input1, $input2, ..., $input12 = '');
setCols
$form->setCols(int $label_col_number, int $field_col_number, string $breakpoint = 'sm');
addHelper
$form->addHelper(string $helper_text, string $element_name);
addAddon
$form->addAddon(string $input_name, string $addon_html, string $pos);
addHeading
$form->addHeading(string $html, string $tag_name = 'h4', string $attr = '');
addIcon
$form->addIcon(string $input_name, string $icon_html, string $pos);
addInputWrapper
$form->addInputWrapper(string $html, string $element_name);
buildAlert
Form::buildAlert(string $content_text, string $framework, string $type = 'success');
centerContent
$form->centerContent(bool $center = true, bool $stack = false);
startDiv
$form->startDiv(string $class = '', string $id = '');
startRow
$form->startRow(string $additional_class = '', string $id = '');
startCol
$form->startCol(int $col_number, string $breakpoint = 'sm', string $additionalClass = '', string $id = '');
Plugins
setPluginsUrl
$form->setPluginsUrl(string $forced_url = '');
addPlugin
$form->addPlugin(string $plugin_name, string $selector, string $js_config = 'default', array $plugin_settings = []);
addFileUpload
(string $name, string $value = '', string $label = '', string $attr = '', array $fileUpload_config = [], array $current_file = [])
addHcaptcha
$form->addHcaptcha(string $sitekey, string $attr = '');
addRecaptchaV3
$form->addRecaptchaV3($key);