Form/Formfield : Add Bulma1 support

This commit is contained in:
Dominique FOURNIER
2026-07-24 15:26:32 +02:00
parent 1c54dc25a5
commit b8799991a1
2 changed files with 1001 additions and 4 deletions
+7 -3
View File
@@ -172,7 +172,7 @@ class Form
/**
* Set the Form Templating to use.
* Can be : Bootstrap3, Bootstrap4 (later Bulma)
* Can be : Bootstrap3, Bootstrap4 Bulma1
* @param string $formTemplate The template to use
*/
public function formTemplate($formTemplate): self
@@ -180,7 +180,7 @@ class Form
if (
! in_array(
$formTemplate,
["Bootstrap3", "Bootstrap4"],
["Bootstrap3", "Bootstrap4", "Bulma1"],
true
)
) {
@@ -354,7 +354,10 @@ class Form
if ($this->formName != "") {
$res .= " id='$this->formName'";
}
$res .= " class='" . $this->formClass . "'>\n";
if ($this->formTemplate !== "Bulma1") {
$res .= " class='" . $this->formClass . "'";
}
$res .= ">\n";
$group = "";
if (isset($_SESSION["domframework"]["form"][$this->formName]["values"])) {
$values = $_SESSION["domframework"]["form"][$this->formName]["values"];
@@ -364,6 +367,7 @@ class Form
}
foreach ($this->fields as $field) {
$field->formName = $this->formName;
$field->formClass = $this->formClass;
if (
isset($field->group) && $field->group !== $group && $group !== "" ||
!isset($field->group) && $group !== ""
+994 -1
View File
File diff suppressed because it is too large Load Diff