File tree Expand file tree Collapse file tree 2 files changed +18
-2
lines changed
Expand file tree Collapse file tree 2 files changed +18
-2
lines changed Original file line number Diff line number Diff line change @@ -60,7 +60,7 @@ Now render the form using:
6060
6161Easy as that.
6262
63- ## Frameworks
63+ ## Frontend frameworks
6464
6565MintyPHP Forms has support for the Bulma framework right out of the box.
6666Just tell MintyPHP Forms that you want to use Bulmas style forms using:
@@ -102,6 +102,10 @@ And the output will be form in the familiar Bulma style:
102102
103103In the future we will add support for other frameworks, such as bootstrap 5.
104104
105+ ## Backend frameworks
106+
107+
108+
105109## Full example
106110
107111Although we don't encourage you to use MintyPHP Forms without a framework, it is certainly possible:
Original file line number Diff line number Diff line change @@ -102,9 +102,21 @@ public function field(Field $field): self
102102 */
103103 public function fields (array $ fields ): self
104104 {
105+ $ this ->hideFieldsets = true ;
106+ $ fieldset = new Fieldset ();
105107 foreach ($ fields as $ field ) {
106- $ this ->field ($ field );
108+ $ fieldset ->field ($ field );
107109 }
110+ $ this ->fieldset ($ fieldset );
111+ return $ this ;
112+ }
113+
114+ public function header (Header $ header ): self
115+ {
116+ $ this ->hideFieldsets = true ;
117+ $ fieldset = new Fieldset ();
118+ $ fieldset ->header ($ header );
119+ $ this ->fieldset ($ fieldset );
108120 return $ this ;
109121 }
110122
You can’t perform that action at this time.
0 commit comments