php-form-builder icon indicating copy to clipboard operation
php-form-builder copied to clipboard

Fieldset/legends

Open mapsedge opened this issue 5 years ago • 1 comments

Added a field attribute, "group", and used vanilla javascript to wrap fieldsets around each set of controls with that group. The javascript is namespaced with a long, random string to avoid collisions. phpFormBuilder-withFieldsets.php.txt

mapsedge avatar Jul 03 '20 18:07 mapsedge

I fixed a few issues in your insertJavascript function:

` function insertJavascript(){ $f = $this->form[id]; $objectName = $this->generateRandomString(20); $out = <<<EOT

            EOT;

	return $out;
}

`

Here i removed the getForm function and put it in it's used line. I then also added it the the getGroups function instead of grabbing the route document.

The issue with getting groups from the route document is that if you have multiple forms on your page it would always put the fieldsets from every form in the first form it finds

Jowcey avatar Nov 18 '21 16:11 Jowcey