Topic: Angular MDB Pro Switch "label" issue
novvia free asked 5 years ago
<div class="switch">
<label>No
<input type="checkbox" mdbInput class="form-check-input" formControlName="xxx">
<span class="lever"></span>Yes
</label></div>
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.
novvia free answered 5 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.
Thanks
Arkadiusz Idzikowski staff commented 5 years ago
Could you show us some code and/or screenshots? It would be easier to help with those kind of information available.
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Answered
- ForumUser: 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
Arkadiusz Idzikowski staff commented 5 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?