Hey there, I am experiencing an issue with two ratings fields on my page. When the first rating is checked and then I check the second one, the first one automatically gets unchecked. While this does not affect the value saved in the back-end, it's causing confusion for visitors as the stars disappear.
I'm wondering if there is a way in javascript or jQuery to ensure that once a field is checked, it remains checked?
<script src="https://code.jquery.com/jquery-1.10.2.js"></script>
<fieldset class="rate">
<input id="5-stars-1" type="radio" name="firstRate" value="5" />
<label for="5-stars-1">5</label>
<input id="4-stars-1" type="radio" name="firstRate" value="4" />
<label for="4-stars-1">5</label>
</fieldset>
<fieldset class="rate2">
<input id="5-stars-2" type="radio" name="secondRate" value="5" />
<label for="5-stars-2">5</label>
<input id="4-stars-2" type="radio" name="secondRate" value="4" />
<label for="4-stars-2">5</label>
</fieldset>
Any suggestions or insights on how to tackle this issue would be greatly appreciated!
If you require further information or code snippets, please feel free to reach out!