@@ -320,11 +320,11 @@ will render this HTML:
320320``` html
321321<form method =" post" accept-charset =" utf-8" action =" /articles/add" >
322322 <!-- ... -->
323- <div class =" mb-3 form-group text" >
323+ <div class =" mb-3 text" >
324324 <label class =" form-label" for =" title" >Title</label >
325325 <input type =" text" name =" title" id =" title" class =" form-control" >
326326 </div >
327- <div class =" mb-3 form-group form- check checkbox" >
327+ <div class =" mb-3 form-check checkbox" >
328328 <input type =" hidden" name =" published" value =" 0" >
329329 <input type =" checkbox" class =" form-check-input" name =" published" value =" 1" id =" published" >
330330 <label class =" form-check-label" for =" published" >Published</label >
@@ -356,6 +356,7 @@ echo $this->Form->create($article, [
356356]);
357357echo $this->Form->control('title');
358358echo $this->Form->control('published', ['type' => 'checkbox']);
359+ echo $this->Form->submit();
359360echo $this->Form->end();
360361```
361362
@@ -364,13 +365,13 @@ It will render this HTML:
364365``` html
365366<form method =" post" accept-charset =" utf-8" class =" form-horizontal" action =" /articles/add" >
366367 <!-- ... -->
367- <div class =" mb-3 form-group row text" >
368+ <div class =" mb-3 row text" >
368369 <label class =" col-form-label col-md-4" for =" title" >Title</label >
369370 <div class =" col-md-8" >
370371 <input type =" text" name =" title" id =" title" class =" form-control" >
371372 </div >
372373 </div >
373- <div class =" mb-3 form-group row checkbox" >
374+ <div class =" mb-3 row checkbox" >
374375 <div class =" offset-md-4 col-md-8" >
375376 <div class =" form-check" >
376377 <input type =" hidden" name =" published" value =" 0" />
@@ -380,6 +381,7 @@ It will render this HTML:
380381 </div >
381382 </div >
382383 <!-- ... -->
384+ <button type =" submit" class =" btn btn-secondary" >Submit</button >
383385</form >
384386```
385387
@@ -404,21 +406,22 @@ echo $this->Form->create($article, [
404406]);
405407echo $this->Form->control('title');
406408echo $this->Form->control('published', ['type' => 'checkbox']);
409+ echo $this->Form->button('Submit');
407410echo $this->Form->end();
408411```
409412
410413It will render this HTML:
411414
412415``` html
413- <form method =" post" accept-charset =" utf-8" class = " form-horizontal " action =" /articles/add" >
416+ <form method =" post" accept-charset =" utf-8" action =" /articles/add" >
414417 <!-- ... -->
415- <div class =" mb-3 form-group row text" >
418+ <div class =" mb-3 row text" >
416419 <label class =" col-form-label col-sm-6 col-md-4" for =" title" >Title</label >
417420 <div class =" col-sm-6 col-md-8" >
418421 <input type =" text" name =" title" id =" title" class =" form-control" >
419422 </div >
420423 </div >
421- <div class =" mb-3 form-group row checkbox" >
424+ <div class =" mb-3 row checkbox" >
422425 <div class =" offset-sm-6 offset-md-4 col-sm-6 col-md-8" >
423426 <div class =" form-check" >
424427 <input type =" hidden" name =" published" value =" 0" />
@@ -428,6 +431,7 @@ It will render this HTML:
428431 </div >
429432 </div >
430433 <!-- ... -->
434+ <button type =" submit" class =" btn btn-secondary" >Submit</button >
431435</form >
432436```
433437
@@ -450,24 +454,32 @@ echo $this->Form->create($article, [
450454]);
451455echo $this->Form->control('title', ['placeholder' => 'Title']);
452456echo $this->Form->control('published', ['type' => 'checkbox']);
457+ echo $this->Html->div('col-auto', $this->Form->button('Submit'));
453458echo $this->Form->end();
454459```
455460
456461will render this HTML:
457462
458463``` html
459- <form method =" post" accept-charset =" utf-8" class = " form-inline " action =" /articles/add" >
464+ <form method =" post" accept-charset =" utf-8" action =" /articles/add" >
460465 <!-- ... -->
461- <div class =" form-group text" >
462- <label class =" form-label visually-hidden" for =" title" >Title</label >
463- <input type =" text" name =" title" placeholder =" Title" id =" title" class =" form-control" />
466+ <div class =" col-auto" >
467+ <div class =" text" >
468+ <label class =" form-label visually-hidden" for =" title" >Title</label >
469+ <input type =" text" name =" title" placeholder =" Title" id =" title" class =" form-control" />
470+ </div >
464471 </div >
465- <div class =" form-check form-check-inline checkbox" >
466- <input type =" hidden" name =" published" value =" 0" />
467- <input type =" checkbox" name =" published" value =" 1" id =" published" class =" form-check-input" >
468- <label class =" form-check-label" for =" published" >Published</label >
472+ <div class =" col-auto" >
473+ <div class =" form-check checkbox" >
474+ <input type =" hidden" name =" published" value =" 0" />
475+ <input type =" checkbox" name =" published" value =" 1" id =" published" class =" form-check-input" >
476+ <label class =" form-check-label" for =" published" >Published</label >
477+ </div >
469478 </div >
470479 <!-- ... -->
480+ <div class =" col-auto" >
481+ <button type =" submit" class =" btn btn-secondary" >Submit</button >
482+ </div >
471483</form >
472484```
473485
@@ -530,7 +542,7 @@ echo $this->Form->control('title', [
530542This would generate the following HTML:
531543
532544``` html
533- <div data-meta =" meta information" class =" my-title-control mb-3 form-group text" >
545+ <div data-meta =" meta information" class =" my-title-control mb-3 text" >
534546 <label class =" form-label" for =" title" >Title</label >
535547 <input type =" text" name =" title" id =" title" class =" form-control" >
536548</div >
@@ -549,7 +561,7 @@ echo $this->Form->control('email', [
549561This would generate the following HTML:
550562
551563``` html
552- <div class =" mb-3 form-group email" >
564+ <div class =" mb-3 email" >
553565 <label class =" form-label" for =" email" >Email</label >
554566 <div class =" input-group" >
555567 <span class =" input-group-text" >@</span >
@@ -571,7 +583,7 @@ echo $this->Form->control('amount', [
571583This would generate the following HTML:
572584
573585``` html
574- <div class =" mb-3 form-group text" >
586+ <div class =" mb-3 text" >
575587 <label class =" form-label" for =" amount" >Amount</label >
576588 <div class =" input-group" >
577589 <span class =" input-group-text" >$</span >
@@ -606,7 +618,7 @@ echo $this->Form->control('amount', [
606618This would generate the following HTML:
607619
608620``` html
609- <div class =" mb-3 form-group text" >
621+ <div class =" mb-3 text" >
610622 <label class =" form-label" for =" amount" >Amount</label >
611623 <div class =" input-group input-group-lg custom" custom =" attribute" >
612624 <span class =" input-group-text" >$</span >
@@ -618,7 +630,7 @@ This would generate the following HTML:
618630
619631### Inline checkboxes and radio buttons
620632
621- [ Inline checkboxes/switches and radio buttons] ( https://getbootstrap.com/docs/4.5 /components/forms/#inline ) (not to be
633+ [ Inline checkboxes/switches and radio buttons] ( https://getbootstrap.com/docs/5.3 /components/forms/#inline ) (not to be
622634confused with inline aligned forms), can be created by setting the ` inline ` option to ` true ` .
623635
624636Inlined checkboxes/switches and radio buttons will be rendered on the same horizontal row. When using horizontal form
@@ -665,7 +677,7 @@ echo $this->Form->control('option', [
665677This would generate the following HTML:
666678
667679``` html
668- <div class =" mb-3 form-group form- check form-switch checkbox" >
680+ <div class =" mb-3 form-check form-switch checkbox" >
669681 <input type =" hidden" name =" option" value =" 0" />
670682 <input type =" checkbox" name =" option" value =" 1" id =" option" class =" form-check-input" >
671683 <label class =" form-check-label" for =" option" >Option</label >
@@ -688,15 +700,15 @@ echo $this->Form->control('title', [
688700This would generate the following HTML:
689701
690702``` html
691- <div class =" mb-3 form-floating form-group text" >
703+ <div class =" mb-3 form-floating text" >
692704 <input type =" text" name =" title" id =" title" class =" form-control" />
693705 <label for =" title" >Title</label >
694706</div >
695707```
696708
697709### Help text
698710
699- Bootstrap's [ form help text] ( https://getbootstrap.com/docs/4.5 /components/forms/#help-text ) is supported via the
711+ Bootstrap's [ form help text] ( https://getbootstrap.com/docs/5.3 /components/forms/#help-text ) is supported via the
700712` help ` option.
701713
702714The help text is by default being rendered in between of the control and the validation feedback.
@@ -710,7 +722,7 @@ echo $this->Form->control('title', [
710722This would generate the following HTML:
711723
712724``` html
713- <div class =" mb-3 form-group text" >
725+ <div class =" mb-3 text" >
714726 <label class =" form-label" for =" title" >Title</label >
715727 <input type =" text" name =" title" id =" title" class =" form-control" aria-describedby =" title-help" />
716728 <small id =" title-help" class =" d-block form-text text-muted" >Help text</small >
@@ -734,7 +746,7 @@ echo $this->Form->control('title', [
734746This would generate the following HTML:
735747
736748``` html
737- <div class =" mb-3 form-group text" >
749+ <div class =" mb-3 text" >
738750 <label class =" form-label" for =" title" >Title</label >
739751 <input type =" text" name =" title" id =" title" class =" form-control" aria-describedby =" custom-help" />
740752 <small id =" custom-help" class =" custom d-block form-text text-muted" data-custom =" attribute" >Help text</small >
@@ -756,7 +768,7 @@ echo $this->Form->control('title', [
756768This would generate the following HTML:
757769
758770``` html
759- <div class =" mb-3 form-group text" >
771+ <div class =" mb-3 text" >
760772 <label class =" form-label" for =" title" >
761773 Title <span data-bs-toggle =" tooltip" title =" Tooltip text" class =" bi bi-info-circle-fill" ></span >
762774 </label >
@@ -766,7 +778,7 @@ This would generate the following HTML:
766778
767779If you want to use a different toggle, being it a different Boostrap icon, or maybe a completely different icon
768780font/library, then you can do this by
769- [ overriding the ` tooltip ` template] ( https://book.cakephp.org/4 /en/views/helpers/form.html#customizing-the-templates-formhelper-uses )
781+ [ overriding the ` tooltip ` template] ( https://book.cakephp.org/5 /en/views/helpers/form.html#customizing-the-templates-formhelper-uses )
770782accordingly, being it globally, per form, or per control:
771783
772784``` php
@@ -781,8 +793,8 @@ echo $this->Form->control('title', [
781793### Error feedback style
782794
783795BootstrapUI supports two styles of error feedback, the
784- [ regular Bootstrap text feedback] ( https://getbootstrap.com/docs/4.5 /components/forms/#validation ) , and
785- [ Bootstrap tooltip feedback] ( https://getbootstrap.com/docs/4.5 /components/forms/#tooltips ) (not to be confused with
796+ [ regular Bootstrap text feedback] ( https://getbootstrap.com/docs/5.3 /components/forms/#validation ) , and
797+ [ Bootstrap tooltip feedback] ( https://getbootstrap.com/docs/5.3 /components/forms/#tooltips ) (not to be confused with
786798label tooltips that are configured via the ` tooltip ` option!).
787799
788800The style can be configured via the ` feedbackStyle ` option, either globally, per form, or per control. The supported
@@ -794,7 +806,7 @@ styles are:
794806 (inline forms are using this style by default).
795807
796808Note that using the tooltip error style requires the form group elements to be non-static positioned! The form helper
797- will automatically add Bootstraps [ position utility class] ( https://getbootstrap.com/docs/4.5 /utilities/position/ )
809+ will automatically add Bootstraps [ position utility class] ( https://getbootstrap.com/docs/5.3 /utilities/position/ )
798810` position-relative ` to the form group elements when the tooltip error style is enabled.
799811
800812If you need different positioning, use either CSS to override the ` position ` rule on the ` .form-group ` elements, or use
@@ -821,7 +833,7 @@ echo $this->Form->control('title');
821833With an error on the ` title ` field, this would generate the following HTML:
822834
823835``` html
824- <div class =" mb-3 form-group position-absolute text is-invalid" >
836+ <div class =" mb-3 position-absolute text is-invalid" >
825837 <label class =" form-label" for =" title" >Title</label >
826838 <input type =" text" name =" title" id =" title" class =" is-invalid form-control" />
827839 <div class =" invalid-tooltip" >Error message</div >
0 commit comments