Topic: mdbInput checkbox labeless
                  
                  digitalmanagerguru
                  free
                  asked 5 years ago
                
On the input.vue you are using an label html for labeless checkbox, why?!
<label
      v-if="isThisCheckboxLabeless"
      :class="labelClasses"
      @click="focus"
      ref="label"
      :for="id"
    />
because I was now adding a label:
 <mdb-input
                        v-model="form.terms"
                        id="terms"
                        type="checkbox"
                    >
                        <label for="terms" class="form-check-label"><a :href="trans('label.terms.url')" target="_blank">{{ trans('label.terms.text') }}</a></label>
                    </mdb-input>
and there is now 2 labels rendered on the final html.
I don't see why the need of that label for labeless checkbox.
I'll bypass with some css the layout issue, but I would appreciate to know the reasons for that labeless and would be great if we could bypass it. Would be better if we set :label="false"
Best regards
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Status
              Opened
Specification of the issue
              - ForumUser: Free
 - Premium support: No
 - Technology: MDB Vue
 - MDB Version: 6.7.0
 - Device: Desktop
 - Browser: Chrome
 - OS: Win.10
 - Provided sample code: No
 - Provided link: No
 
Magdalena Dembna staff commented 5 years ago
Thank you for this remark. We are currently planning major refactors for our components and checkbox will be one of them - we will certainly take your suggestion under consideration. Best regards, Magdalena