CakePHP-Bootstrap / cakephp3-bootstrap-helpers

CakePHP 3.x Helpers for Bootstrap 3 and 4.
https://holt59.github.io/cakephp3-bootstrap-helpers/
MIT License
130 stars 79 forks source link

Radio button and date control generated with fieldset and legend. #142

Closed jaynarayan89 closed 6 years ago

jaynarayan89 commented 6 years ago

<?= $this->Form->input('radio', ['type' => 'radio','name' =>'has_gst', 'default'=>0, 'options' => [1=>'yes',0=>'no'], 'label' => 'Has GST ']) ;?>

generates

<fieldset class="form-group radio">
    <div class="row">
        <legend class="col-form-legend col-sm-2">Has GST </legend>
        <div class="col-sm-10">
            <input type="hidden" name="has_gst" class="form-control" value="">
            <div class="form-check">
                <label class="form-check-label" for="has-gst-1">
                    <input type="radio" class="form-check-input" name="has_gst" value="1" id="has-gst-1"> yes</label>
            </div>
            <div class="form-check">
                <label class="form-check-label" for="has-gst-0">
                    <input type="radio" class="form-check-input" name="has_gst" value="0" id="has-gst-0" checked="checked"> no</label>
            </div>
        </div>
    </div>
</fieldset>

is use of fieldset and legend intended?

Holt59 commented 6 years ago

Yes, it comes from Bootstrap documentation and I found it appropriate here. If you have any issue with these, let me know.

jaynarayan89 commented 6 years ago

ok. thanks. can you provide the link to bootstrap docs? I have checked docs but can't find use of legend.

Holt59 commented 6 years ago

You can find some use here: https://getbootstrap.com/docs/4.0/components/forms/#horizontal-form