You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+2-122
Original file line number
Diff line number
Diff line change
@@ -62,129 +62,9 @@ if ($form->isSubmitted() && $form->isValid()) {
62
62
63
63
See the [examples](examples) directory for examples using AJAX, file uploads, collections and more.
64
64
65
-
## Rendering Individual Fields
65
+
## Documentation
66
66
67
-
Use the `renderStart`, `renderEnd`, `renderField` and `renderRest` methods for more fine-grained control over how fields are rendered, such as using Bootstrap's grid system:
68
-
69
-
```html
70
-
<divclass="container">
71
-
<?= $form->renderStart(); ?>
72
-
<divclass="row">
73
-
<divclass="col-6">
74
-
<?= $form->renderField('first_name'); ?>
75
-
</div>
76
-
<divclass="col-6">
77
-
<?= $form->renderField('last_name'); ?>
78
-
</div>
79
-
</div>
80
-
<?= $form->renderEnd(); ?>
81
-
</div>
82
-
```
83
-
84
-
By default, `renderEnd` will render all remaining unrendered fields before rendering the closing </form> tag. To prevent this, pass `false` as the first argument:
85
-
86
-
```php
87
-
<?= $form->renderEnd(false); ?>
88
-
```
89
-
90
-
## Collections
91
-
92
-
The `CollectionType` can be used to add/remove multiple entries of the same field or set of fields:
93
-
94
-
```php
95
-
use Palmtree\Form\FormBuilder;
96
-
$builder = (new FormBuilder('collection_example'))
0 commit comments