I'm using Clickable star ratings for my e-commerce web site. I have followed the instructions provided within this tutorial:
http://blog.youbility.de/en/clickable-star-ratings-in-magento/
Now I'm trying to accomplished that star rating is required entry. So when I use the class name "required-entry" in the following code of line:
<input type="radio" name="ratings[<?php echo $_rating->getId() ?>]" id="<?php echo $this->escapeHtml($_rating->getRatingCode()) ?>_<?php echo $_option->getValue() ?>" value="<?php echo $_option->getId() ?>" class="radio rating-input" />
just at the end of the code where is says: class=radio rading-input i have made the change so it looks: class=radio rading-input required-entry
Now star rating becomes required-entry, but it becomes required-entry for all the five starts – and i need to make five stars required-entry as one field.
Thanks.
Best Answer
I did same thing but the different way. Instead of putting
required-entry
class toradio
, I add new validation rule to that form.Please put below code in your review form page, it might be work for you:
Here is the output of validation:
Let me know if you have query for the same.
For single rating option: