Need Radio Buttons without Labels


Topic: Need Radio Buttons without Labels

waynefulcher pro asked 6 years ago

My site has a grid with some column headings and a row per customer. There are 4 columns total. Column 1 - Customer Name Columns 2, 3 and 4 are radio buttons where I can select an option for sharing something with the user. Options headings are "Off", "View Only", "Admin" So I need radio buttons but do not need any labels. It appears that if you don't add labels then the radio buttons wont appear. If you do add labels then it makes the overall data too wide for the space I am allocating for just the button. Also even if I override the CSS to hide the label the radio buttons are also off center so they do not center under the headings. I am finding with checkboxes and now radio buttons having the MDB Library is causing me to do a lot more coding than if I didn't have it. Can you add the ability to simply turn these off if we do not want them? Don't get me wrong I am excited to get around to using it for other things its just before I can do that I have to fix all the things in my website that are now broken by having added the library. Hopefully there is a fairly easy fix.  

Anna Morawska staff answered 6 years ago

Hi there, unfortunately, it is not possible to just remove labels, because they are responsible for styling. If you don't need them, maybe just add it as an empty HTML element, like so.
<div class="form-check form-check-inline">

<input type="radio"class="form-check-input" id="example" name="inlineMaterialRadiosExample">

<label class="form-check-label" for="example"></label>

</div>
Then, you can also remove "padding-left" rule for those checkboxes, by adding additional class or id and custom css rule.
Is this solves your problem?
Best,
Ania

Please insert min. 20 characters.

FREE CONSULTATION

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

Status

Answered

Specification of the issue
  • User: Pro
  • Premium support: No
  • Technology: MDB jQuery
  • MDB Version: -
  • Device: -
  • Browser: -
  • OS: -
  • Provided sample code: No
  • Provided link: No