radio buttons

Muziekvoormeloenen Meloen pro asked 10 years ago

I have following existing html (with Django and using Djang-crispy-forms) which worked fine: <input type='hidden' name='question_id' value='{{ instance.id }}'/> <h6>Your Answer and its Importance:</h6> <div class="form-group"> {% for ans in instance.answer_set.all %} <div class="col-lg-10"> <div class="radio"> <label> <input type="radio" name='answer_id' value='{{ ans.id }}' {% if user_answer.my_answer.id == ans.id %}checked=checked{% endif %}/> {{ ans.text }} </label> </div> </div> {% endfor %} </div> How do I adapt this html to use the MDBootstrap radio button component?

Michal Szymanski staff pro premium priority answered 10 years ago

Hi, have you tried to implement our markup? Try to create a similar construction with your code.
Please insert min. 20 characters.

FREE CONSULTATION

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

Status

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