I am implementing a star rating and am using the font awesome star in my form but I don't know how to set the star value. I have many values in this form like input and buttons. But i don't know how to the set value of a star.
https://css-tricks.com/star-ratings/
.rating {
unicode-bidi: bidi-override;
direction: rtl;
float:left;
}
.rating > span {
display: inline-block;
position: relative;
width: 1.1em;
}
.rating > span:hover:before,
.rating > span:hover ~ span:before {
content: "\2605";
position: absolute;
}
<form>
<div class="rating">
<span>☆</span><span>☆</span><span>☆</span><span>☆</span><span>☆</span>
</div>
</form>
I want set the value in star. After a click on the star then the star should be black.