question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Radio buttons not working...clicking on them does not do anything

See original GitHub issue

This is the relevant html div. I have formatted part of it to make it readable. If I comment out the materialize css script in my html file, everything works fine. However, with materialize script included the radio buttons do not respond to clicks.

<div>
<div>
   <p id="q1">1.   If you earn 1000GD per month, your total profit in the game will be:</p>
     <form action="#">
         <input type="radio" name="q1" value="1" id="q_1_1"><label>5,000GD</label><br>
         <input type="radio" name="q1" value="2" id="q_1_2"><label>10,000GD</label><br>
        <input type="radio" name="q1" value="3" id="q_1_3"><label>12,000GD</label><br>
        <input type="radio" name="q1" value="4" id="q_1_4"><label>15,000GD</label><br>
    </form></div><div><p id="q2">2.   How often can you change the price?
</p><form action="#"><input type="radio" name="q2" value="1" id="q_2_1"><label>Once a month</label><br><input type="radio" name="q2" value="2" id="q_2_2"><label>Once every 6 months</label><br><input type="radio" name="q2" value="3" id="q_2_3"><label>Once a year</label><br></form></div><div><p id="q3">3.   You must change the price every month.</p><form action="#"><input type="radio" name="q3" value="1" id="q_3_1"><label>False. I can, but I don't have to change the price every month. I can continue
    with the same price I chose in the previous month.</label><br><input type="radio" name="q3" value="2" id="q_3_2"><label>True, I have to change the price once a month.</label><br></form></div></div>

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:12 (1 by maintainers)

github_iconTop GitHub Comments

16reactions
Nohinncommented, Jun 15, 2016

The labels should have an attribute ‘for’ pointing to the id of the radio it belongs. <input type="radio" name="q1" value="1" id="q_1_1"><label for="q_1_1">5,000GD</label>

11reactions
teja2866commented, Aug 24, 2018

please use the below video link to resolve the issue https://youtu.be/-AO5unPo0Rw

Read more comments on GitHub >

github_iconTop Results From Across the Web

Radio button is not working properly - Stack Overflow
After reviewing my code, I noticed that I used a javascript method "event.preventDefault();" in this custom function that I've made where the HTML...
Read more >
Radio buttons are not responding when i click on them
I'm trying to use MDB Angular radio buttons but they are not responding when i click on them, They remain unchecked when i...
Read more >
Radio buttons do not respond to mouse clicks
On many web pages I am unable to select radio buttons with a mouse click. The same problem exists whether I use IE,...
Read more >
Not able to click on dynamic radio button - StudioX
Use a FIND TEXT POSITION activity and pass the text you want to click accordingly · Then use a ANCHOR BASE activity where...
Read more >
Why does this simplest form of radio buttons not work?
Your radio button will stay selected if you dont have the same name for each of the elements. input type=”radio” name=”18over”> input type=”radio”...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found