Topic: Angular MDB Pro Switch "label" issue

novvia free asked 3 years ago

<div class="switch">
    <input  type="checkbox" mdbInput class="form-check-input" formControlName="xxx">
    <span class="lever"></span>Yes

Is there a way to include a "label" for as switch, like there is for other components? I can add text above the actual <label> switch, but when I wrap it in all in a div with md-form then it will put the switch "under" the label. If I leave it out of the md-form then the switch has a slightly different appearance than other form elements.

Arkadiusz Idzikowski staff commented 3 years ago

Could you provide more information/examples about the label you need to add? Is there any problem with 'Yes' and 'No' labels when you use this code?

novvia free answered 3 years ago

Arkadiusz,Thank you for your response. Yes or No are perfect for the "Answer". What I am more interested in is having the "Question" part of the component. Specifically to line up well with the question and have the question be formatted in the md-form style AND to have the question be able to be hooked into validation.


Arkadiusz Idzikowski staff commented 3 years ago

Could you show us some code and/or screenshots? It would be easier to help with those kind of information available.

Please insert min. 20 characters.


Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.



Specification of the issue

  • User: Free
  • Premium support: No
  • Technology: MDB Angular
  • MDB Version: 7.5.4
  • Device: Macbook Pro
  • Browser: Chrome
  • OS: OS X
  • Provided sample code: Yes
  • Provided link: No