I'm trying to populate radio buttons with data from MySQL.
I'd like the selected radio button to change colour, and the first element to be selected on page load.
How can I do this?
<div class="panel bg-product">
<?php
$stmt = mysqli_prepare($link, "SELECT id, name, price FROM products");
$stmt->execute();
$stmt->bind_result($prod_id, $prod_name, $prod_price);
while($stmt->fetch()) {
echo '<label><input type="radio" name="config-prod" value="'.$prod_id.'"> ' .$prod_name.'</label><br>';
}
$stmt->close();
?>
</div>
CSS:
.panel input[type="radio"]:checked + label{
font-weight: 700;
color: red;
transition: color 0.5s ease;
}
This CSS does not change the colour of the radio button when selected, nor is a radio button selected on load.
This is your new CSS:
.input-list {
list-style-type: none;
width: 100%;
padding: 0;
margin: 0;
}
.input-list li input:checked{
content: "";
-webkit-appearance: push-button;
width: 12px;
border-radius: 13px;
height: 12px;
background: red;
}
.input-list li input:checked + label {
color: red;
}
New JS code:
document.querySelector("#radio li input").checked = true;
And Your new PHP:
<ul id="radio" class="input-list">
<?php
$stmt = mysqli_prepare($link, "SELECT id, name, price FROM products");
$stmt->execute();
$stmt->bind_result($prod_id, $prod_name, $prod_price);
while($stmt->fetch()) {
echo '<li>
<input id="'.$prod_id.'" name="config-prod" value="'.$prod_id.'" type="radio">
<label class="sub-label" for="'.$prod_id.'">'.$prod_name.'</label>
</li>';
}
$stmt->close();
?>
</ul>
And that's how it will look:
document.querySelector("#radio li input").checked = true;
.input-list {
list-style-type: none;
width: 100%;
padding: 0;
margin: 0;
}
.input-list li input:checked {
content: "";
-webkit-appearance: push-button;
width: 12px;
border-radius: 13px;
height: 12px;
background: red;
}
.input-list li input:checked + label {
color: red;
}
<ul id="radio" class="input-list">
<li>
<input id="first" name="radio" value="first" type="radio">
<label class="sub-label" for="first">first</label>
</li>
<li>
<input id="second" name="radio" value="second" type="radio">
<label class="sub-label" for="second">second</label>
</li>
</ul>
This should do the trick for you. But you must note that it colors the label and not the radio, I think this is what you were trying to achieve.
HTML:
<div class="panel">
<input type="radio" name="radios" /><label>R1</label> //label for first Radio
<input type="radio" name="radios" /><label>R2</label> //Label for second radio
</div>
CSS:
.panel input[type="radio"]:checked + label{
background-color: yellow;
width: 10px;
height: 10px;
display: inline-block;
}
Tested on Codepen and works. Just use this as a template and populate your data accordingly. Just used some style to make it visible as I test.
Related
I have php form like this
First, user need to select Type of individual.
if user do not select anything and click submit button, a required message will show. actually my form work if user doing straight forward.
The problem is when user do not select type individiual and click submit, message apair. but when user select individual, the radio button dont change to blue. the radio button should change to whatever user select.
but if user select company, the button can change to blue
scenario:
User do not select type individual, then click submit, required message apair
User then select company (radio button change to blue), but if user select individu (radio button dont change, but the hide/show function still work, it not change to blue only, blue color just for remark if user select that button)
$( document ).ready(function( $ ) {
$("#smart-form-register").validate({
rules : {
type_of_individual: {
required : true,
},
type_sfaff: {
required : true,
},
},
});
});
$( "#radio-one" ).change(function() {
var ind = $('#radio-one').val();
$("#type_staff").show();
$("#non_individual").hide();
$("#staff").hide();
});
$( "#radio-two" ).change(function() {
var non = $('#radio-two').val();
$("#individual").hide();
$("#non_individual").show();
$("#staff").hide();
$("#type_staff").hide();
$("#radio-three").prop('checked', false);
$("#radio-four").prop('checked', false);
});
//IF STAFF
$( "#radio-three" ).change(function() {
var staff1 = $('#radio-three').val();
$("#staff").show();
$("#individual").show();
});
//IF NON
$( "#radio-four" ).change(function() {
var nonstaff = $('#radio-four').val();
$("#staff").hide();
$("#individual").show();
});
.switch-field {
display: flex;
margin-bottom: 36px;
overflow: hidden;
}
.switch-field input {
position: absolute !important;
clip: rect(0, 0, 0, 0);
height: 1px;
width: 1px;
border: 0;
overflow: hidden;
}
.switch-field label {
/* background-color: #e4e4e4;
color: rgba(0, 0, 0, 0.6);
font-size: 14px;
line-height: 1;
text-align: center;
padding: 8px 16px;
margin-right: -1px;
border: 1px solid rgba(0, 0, 0, 0.2);
box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3), 0 1px rgba(255, 255, 255, 0.1);
transition: all 0.1s ease-in-out;*/
padding: 6px;
margin: 10px 17px 15px 0;
font-size: 16px;
background: #fff;
color: #0e4e91;
border: solid 2px #0e4e91;
border-radius: 5px;
min-width: 150px;
text-align: center;
transition: all 0.1s ease-in-out;
margin-right: -1px;
}
.switch-field label:hover {
cursor: pointer;
/*background-color: #204184;
box-shadow: none;
border: solid 2px #204184;
color: #fff;*/
}
.switch-field input:checked + label {
background-color: #204184;
box-shadow: none;
border: solid 2px #204184;
color: #fff;
}
.switch-field label:first-of-type {
border-radius: 4px 0 0 4px;
}
.switch-field label:last-of-type {
border-radius: 0 4px 4px 0;
}
.switch-field label.error {
position:absolute;
display: inline-block;
max-width: 100%;
font-weight: 700;
font-size: 16px;
background: #fff;
color: #e82c0c !important;
border: 0px !important;
border-radius: 5px;
min-width: 150px;
margin-top: 60px!important;
padding: 0 1px!important;
line-height: 15px!important;
}
.switch-field label[for=switch_right] {
background-color: red !important;
}
<script src="https://code.jquery.com/jquery-1.11.1.min.js"></script>
<script src="https://cdn.jsdelivr.net/jquery.validation/1.16.0/jquery.validate.min.js"></script>
<script src="https://cdn.jsdelivr.net/jquery.validation/1.16.0/additional-methods.min.js"></script>
<div>
<form id="smart-form-register">
<label class="control-label" for="name">Individual Type</label><br>
<div class="switch-field">
<input type="radio" id="radio-one" name="type_of_individual" value="1" required="">
<label for="radio-one">Individual</label>
<input type="radio" id="radio-two" name="type_of_individual" value="0" required >
<label for="radio-two">Company</label></div>
</div>
<div id="type_staff" style="display: none">
<label class="control-label" for="name">Staff Type</label><br>
<div class="switch-field">
<input type="radio" id="radio-three" name="type_of_staff" value="1" required="">
<label for="radio-one">Staff</label>
<input type="radio" id="radio-four" name="type_of_staff" value="0" required >
<label for="radio-two">Non Staff</label></div>
</div>
<!--INDIVIDUAL-->
<div id="individual" style="display: none">
<label>Fullname <sup>*</sup></label>
<input type="text" class="form-control" id="fullname" name="fullname" maxlength="255" >
</div>
<!--NON INDIVIDUAL-->
<div id="non_individual" style="display: none">
<label>Company Name <sup>*</sup></label>
<input type="text" class="form-control" id="company_name" name="company_name" maxlength="255" >
</div>
<!--STAFF-->
<div id="staff" style="display: none">
<label>Staff ID <sup>*</sup></label>
<input type="text" class="form-control" id="staff_id" name="staff_id" maxlength="255" >
</div>
<button type="submit" name="singlebutton" class="btn btn-primary btn-sm " id="register" >Submit</button></form>
I created a makeshift hide/show menu in HTML/CSS using a checkbox, it works great to hide and show text and links, but I have a section where I'd like to show a button when the "checkbox" is clicked. At first it looks great, the button is hidden and when the user clicks the checkbox, a button appears below it. My problem that I'm having is that if the user clicks below the checkbox where the button appears before the button actually appears, they can still trigger the button. Any idea?
<td>
<label class="collapsible">
<input type="checkbox" />
<span class="collapser">Edit</span>
<span class="arrow">></span>
<div class="collapsed">
<form method="post">
<input type="hidden" id="pwd" name="deleteid" value='. $value["id"] . '>
<button onclick="return confirm_delete();" type="submit" name="DelBidSubmit" class="btn btn-default">Delete</button>
<script type="text/javascript">
function confirm_delete() {
return confirm("Are you sure you wish to delete that?");
}
</script></form></div></label></td>
Heres my CSS code just in case
.collapsible {
display: block;
margin-bottom: 1rem;
}
.collapsible input {
position: absolute;
left: -9999px;
}
.collapsible input:focus ~ .collapser {
border-color: grey;
}
.collapsible .collapser {
cursor: pointer;
border: 1px transparent dotted;
}
.collapsible .arrow {
float: right;
margin-left: 0.5em;
display: inline-block;
transform: rotate(90deg);
transition: transform 0.25s ease-out;
}
.collapsible input:checked ~ .arrow,
.collapsible input:checked ~ .collapser .arrow {
transform: rotate(270deg);
}
.collapsible .collapsed {
font-size: 0;
margin: 0;
opacity: 0;
padding: 0;
/* fade out, then shrink */
transition: opacity 0.25s, margin 0.5s 0.25s, font-size 0.5s 0.25s, padding 0.5s 0.25s;
}
.collapsible input:checked ~ .collapsed {
font-size: 12px;
opacity: 1;
height: auto;
padding: 5px 0;
/* grow, then fade in */
transition: margin 0.25s, padding 0.25s, font-size 0.25s, opacity 0.5s 0.25s;
}
I think you must use {display: none}; and {display: block} to handle show/hide actions. Remove opacity:0 and opacity:1 from your styles and replace display:none and display:block styles.
I am developing a sort of library in which a user is able to upload different files and then only post those desired.
When the user uploads a file or files, these will be stored in a temporary folder. Later, by filling a form the user can post a selected file. As soon as the user pushs the submit button I want to move the file from the temporary folder to another folder suggested by the user.
At the moment, I am able to create the suggested folder. Nevertheless, I am getting an "access denied (code 5)" error, and the files do not appear on the new folder. I've read other issues, and added "Read and Write" permissions to my all users for all folders inside htdocs(XAMPP folder). Still, the error continues to appear.
I am running this script in an AJAX file (shown below in the JS code).
Here is my code. Hope you can help me and this can help others! Than you
// When the form is submitted we want for the temp file to be moved to the directory chosen by the user
$( "form" ).submit(function( event ) {
$directory = $('#directory').val();
$file = $('#fileid').val();
$.ajax({
url:'ajax/rename.php',
type:"POST",
data:({ directory:$directory,
file:$file
}),
success:function(data){
//window.location.href = 'home';//redirect to the homepage
alert(data);
},
error: function(xhr, status, error) {
var err = eval("(" + xhr.responseText + ")");
alert(err.Message);
}
});event.preventDefault();
});
AJAX CODE
<?php
require_once '../../app/models/DB.php';
require_once '../../app/models/Files.php';
require_once '../../app/init.php';
$db= DB::getInstance();
$files= new Files();
$directory = $_POST['directory'];
$file = $_POST['file'];
if (!file_exists('../' . $directory)) {
mkdir('../' . $directory, 0744, true);
chmod('../'. $directory, 0777);
}
$currentdirectory = $db->query("SELECT path FROM file WHERE id = '$file'")->first()->path;
rename('../' . $currentdirectory,'../' . $directory);
$data = $db->query("UPDATE file SET path = '$directory' WHERE id = '$file'");
echo('../' . $currentdirectory);
?>
.secondaryContainer{
margin:0 auto; width:86%;
height:58px;
background: linear-gradient(to bottom,#FBFBFB,#A7A6A6) #f3f3f3;
border-radius: 5px 5px 5px 5px;
}
#HomesearchBar{
float:right;
}
.boxHeader{
padding:15px 15px 0px 15px ;
}
#headerTab{
border-bottom:0px;
}
.filesBoxContent{
background-color: #aeaeae !important;
border-color: #818181 !important;
border-radius: 5px 5px 5px 5px;
}
#MainPageThumbnails{
margin-top: 15px;
}
#MainPageThumbnails{
text-align:justify;
}
.clicked {
border: 3px solid blue;
}
#mainPage{
max-width: 900px;
}
#mainPage h1, #mainPage h2 {
font-size: 28px;
color: #25A7DE;
font-weight: lighter;
text-align: left;
}
.postPage legend {
text-align: center;
background: #25A7DE;
color: #fff;
font-size: 18px;
padding: 4px;
-webkit-border-radius: 34px;
-moz-border-radius: 34px;
border-radius: 34px;
width: 34px;
height: 34px;
}
fieldset{
border-top: 1px solid #ccc;
}
.fileUpload {
position: relative;
overflow: hidden;
margin: 10px;
}
.fileUpload input.upload {
position: absolute;
top: 0;
right: 0;
margin: 0;
padding: 0;
font-size: 20px;
cursor: pointer;
opacity: 0;
filter: alpha(opacity=0);
}
#banner_warning{
float:left;
}
.form-actions {
margin: 0;
background-color: transparent;
text-align: center;
}
/*---------Category CSS-------*/
.subcategoryList,.categoryList {
border-radius: 15px;
background-color: white;
border: 1px solid #ccc;
padding: 5px;
min-height:150px;
max-height:150px;
overflow-y: auto;
overflow-x:hidden;
margin-bottom:20px !important;
}
.categoryList{
float: left;
width:49%;
}
.subcategoryList{
float: right;
width:49%;
visibility: hidden;
}
.subcategoryList ul,.categoryList ul {
list-style-type: none;
margin: 0;
padding: 0;
}
.subcategory,.category {
text-decoration: none;
color: #000;
-webkit-transition: font-size 0.3s ease, background-color 0.3s ease;
-moz-transition: font-size 0.3s ease, background-color 0.3s ease;
-o-transition: font-size 0.3s ease, background-color 0.3s ease;
-ms-transition: font-size 0.3s ease, background-color 0.3s ease;
transition: font-size 0.3s ease, background-color 0.3s ease;
display: block;
}
.subcategory:hover,.category:hover {
font-size: 15px;
background: #f6f6f6;
}
.input-group{
z-index: 0;
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<!-- Form Container -->
<div id="mainPage" class="container">
<h1>Add New Post</h1>
<div class = "postPage">
<form action="" method="post">
<fieldset class="form-group">
<legend>1</legend>
<div class="input-group">
<span class="input-group-addon" id="basic-addon1">Title*</span>
<input type="text" class="form-control" name="title" id="title" aria-describedby="basic-addon1" placeholder="Enter the post title">
</div>
<div class="fileUpload btn btn-primary">
<span>Choose Banner</span>
<input type="file" name="banner" id="uploadBtn" class="upload" />
</div>
<span id="thumbnail" ></span>
<div id="banner_warning">
<small class="banner">Choose a banner for your post.</small>
</div>
<div class="input-group">
<span class="input-group-addon" id="basic-addon1">Description*</span>
<textarea class="form-control" name="description" id="description" rows="10" placeholder="Type a short description for this file"></textarea>
</div>
</fieldset>
<fieldset class="form-group">
<legend>2</legend>
<div class="categoryList">
<ul>
<?php foreach($category as $item):?>
<li class="category" id="<?php echo $item->id;?>"><?php echo $item->name; ?></li>
<?php endforeach; ?>
</ul>
<input type="hidden" name="category" id="category"/>
</div>
<div class="subcategoryList">
<ul>
</ul>
<input type="hidden" name="subcategory" id="subcategory"/>
</div>
<!-- Trigger/Open The Modal -->
<div class="form-actions">
<button type="button" id="myBtn" class="btn btn-default btn-lg">
<span class="glyphicon glyphicon-paperclip" aria-hidden="true"></span> Add Media
</button>
</div>
<div class="input-group">
<span class="input-group-addon" id="basic-addon1">Directory</span>
<input type="text" class="form-control" name="directory" id="directory" aria-describedby="basic-addon1">
<input type="hidden" name="filename" id="filename"/>
<input type="hidden" name="fileid" id="fileid"/>
</div>
</fieldset>
<fieldset class="form-group">
<legend>3</legend>
<label for="keywords"><h3>Keywords</h3></label>
<textarea class="form-control" name="keywords" id="keywords" rows="3"></textarea>
<small class="text-muted">Separate words by either '/' or ';'</small>
</fieldset>
<!--Token will be generated here. Model Token will be called for this-->
<input type="hidden" name = "token" value="<?php echo Token::generate(); ?>">
<input type="submit" value="Post">
</form>
</div>
</div>
<!-- End of Form Container -->
Firstly i would suggest your sanitize the user input:
$directory = $_POST['directory'];
$file = $_POST['file'];
Later you use $directory in SQL query, could give SQL injection issue.
Secondly check all the file/folder permissions of the parent folder in which the mkdir command makes its new folder.
please visit link
you can see as in this image
please enter "560043" in zip code and click on "mouse button".than text "Check COD Availability At" is displaying below image. but i want to display the text above after clicking on "check" button also.
css
.block-check-delivery .block-title strong {background-image:none; font-size: 11px;}
.block-check-delivery .block-content {padding:0 10px; }
.block-check-delivery input{width: 107px;}
.block-check-delivery .button {
/* float: right; */
position:relative;
left:10px;
}
.block-check-delivery .block-content > br:first-child {
display: none;
}
.block-check-delivery .block-content > br:last-child {
display: none;
}
.block-title {
position: relative;
padding: 10px 0 0;
margin-bottom: 5px;
// border-top: 1px solid #cccccc; // remove this...
border-top: none !important; // Add this
display: inline-block; //
}
.block-content {
margin-top: 5px;
display: inline-block; //
}
.block-title {
position: relative;
padding: 10px 0 0;
margin-bottom: 5px;
border-top: none;
display: inline-block;
}
.std ul {
list-style: disc outside;
/* margin-bottom: 1.5em; */
}
.product-view .product-shop .short-description { margin-bottom: 5px; clear: both; }
.block, .col-left-first { margin-bottom:10px; }
phtml
<div class="block block-list block-check-delivery">
<div class="block-title">
<?php $blockLabel = Mage::getStoreConfig('checkdelivery/general/block_title'); ?>
<strong><span><?php echo $this->__($blockLabel) ?></span></strong>
</div>
<div class="block-content" >
<br>
<input name="zipcode" size="17" type="text" id="zipcode" value="<?php echo Mage::getModel('core/cookie')->get('zip'); ?>" maxlength="10" class="input-text" placeholder="<?php echo $this->__('Enter ZIP Code'); ?>"/>
<button type="button" name="zip-check" title="Check" class="button" id="zip-check" ><span><?php echo $this->__('Check'); ?></span></button>
<div id="delivery-message"></div>
<?php $defaultHtml = Mage::getStoreConfig('checkdelivery/general/default_html'); ?>
<div id="delivery-html"><?php if(Mage::getModel('core/cookie')->get('message')){
echo Mage::getModel('core/cookie')->get('message');
}
else{
$defaultHtml; } ?></div>
<br>
</div>
</div>
just add following css
.block-title{
float:left;
}
You can add this css in this class .block-title :
.block-title {
border-top: medium none;
display: inline-block;
margin-bottom: 5px;
padding: 10px 0 0;
position: relative;
float: left;
}
I have a multi-page form and on one of the pages I have a star-review application, whereby users can vote between 1 and 5 stars. I have it working great, however on the same page I need this multiple times (i.e. different things to review).
I have tried a number of things; changing the class of 'stars' and 'star', but neither allows multiple ratings - they all trigger back to the first one (i.e. if you select 2 star on the second it also defaults the first selection to 2 star, or only selects the first selection to 2 star). Any ideas?
HTML code:
<div class="stars">
<input type="radio" name="star" class="star-1" id="star-1" />
<label class="star-1" for="star-1">1</label>
<input type="radio" name="star" class="star-2" id="star-2" />
<label class="star-2" for="star-2">2</label>
<input type="radio" name="star" class="star-3" id="star-3" />
<label class="star-3" for="star-3">3</label>
<input type="radio" name="star" class="star-4" id="star-4" />
<label class="star-4" for="star-4">4</label>
<input type="radio" name="star" class="star-5" id="star-5" />
<label class="star-5" for="star-5">5</label>
<span></span>
</div>
CSS:
form .stars {
background: url("stars.png") repeat-x 0 0;
width: 150px;
margin: 0 auto;
}
form .stars input[type="radio"] {
position: absolute;
opacity: 0;
filter: alpha(opacity=0);
}
form .stars input[type="radio"].star-5:checked ~ span {
width: 100%;
}
form .stars input[type="radio"].star-4:checked ~ span {
width: 80%;
}
form .stars input[type="radio"].star-3:checked ~ span {
width: 60%;
}
form .stars input[type="radio"].star-2:checked ~ span {
width: 40%;
}
form .stars input[type="radio"].star-1:checked ~ span {
width: 20%;
}
form .stars label {
display: block;
width: 30px;
height: 30px;
margin: 0!important;
padding: 0!important;
text-indent: -999em;
float: left;
position: relative;
z-index: 10;
background: transparent!important;
cursor: pointer;
}
form .stars label:hover ~ span {
background-position: 0 -30px;
}
form .stars label.star-5:hover ~ span {
width: 100% !important;
}
form .stars label.star-4:hover ~ span {
width: 80% !important;
}
form .stars label.star-3:hover ~ span {
width: 60% !important;
}
form .stars label.star-2:hover ~ span {
width: 40% !important;
}
form .stars label.star-1:hover ~ span {
width: 20% !important;
}
form .stars span {
display: block;
width: 0;
position: relative;
top: 0;
left: 0;
height: 30px;
background: url("stars.png") repeat-x 0 -60px;
-webkit-transition: -webkit-width 0.5s;
-moz-transition: -moz-width 0.5s;
-ms-transition: -ms-width 0.5s;
-o-transition: -o-width 0.5s;
transition: width 0.5s;
}
I got it working by changing the radio name and keeping IDs unique.
Radio buttons are grouped by name so that each represents a value for a particular form "variable". With each set of stars representing a different variable, a product's rating, each group should have a separate name reflecting which product they're for e.g. appending the product id, name="star-123456". You could also append the index of the product in the list of items for the form.
IDs should always be unique among elements. In this case the radio input ids should be unique for the labels' for attribute to point to the right one.
The snippet below contains unique names for the two radio groups and unique IDs for each radio input.
form .stars {
background: gray;
width: 150px;
margin: 0 auto;
}
form .stars input[type="radio"] {
position: absolute;
opacity: 0;
filter: alpha(opacity=0);
}
form .stars input[type="radio"].star-5:checked ~ span {
width: 100%;
}
form .stars input[type="radio"].star-4:checked ~ span {
width: 80%;
}
form .stars input[type="radio"].star-3:checked ~ span {
width: 60%;
}
form .stars input[type="radio"].star-2:checked ~ span {
width: 40%;
}
form .stars input[type="radio"].star-1:checked ~ span {
width: 20%;
}
form .stars label {
display: block;
width: 28px;
height: 28px;
border: 1px solid black;
margin: 0!important;
padding: 0!important;
text-indent: -999em;
float: left;
position: relative;
z-index: 10;
background: transparent!important;
cursor: pointer;
}
form .stars label:hover ~ span {
background-position: 0 -30px;
}
form .stars label.star-5:hover ~ span {
width: 100% !important;
}
form .stars label.star-4:hover ~ span {
width: 80% !important;
}
form .stars label.star-3:hover ~ span {
width: 60% !important;
}
form .stars label.star-2:hover ~ span {
width: 40% !important;
}
form .stars label.star-1:hover ~ span {
width: 20% !important;
}
form .stars span {
display: block;
width: 0;
position: relative;
top: 0;
left: 0;
height: 30px;
background: red;
filter: alpha(opacity=0);
-webkit-transition: -webkit-width 0.5s;
-moz-transition: -moz-width 0.5s;
-ms-transition: -ms-width 0.5s;
-o-transition: -o-width 0.5s;
transition: width 0.5s;
}
<form>
<div class="stars">
<input type="radio" name="star_a" class="star-1" id="star_a-1" />
<label class="star-1" for="star_a-1">1</label>
<input type="radio" name="star_a" class="star-2" id="star_a-2" />
<label class="star-2" for="star_a-2">2</label>
<input type="radio" name="star_a" class="star-3" id="star_a-3" />
<label class="star-3" for="star_a-3">3</label>
<input type="radio" name="star_a" class="star-4" id="star_a-4" />
<label class="star-4" for="star_a-4">4</label>
<input type="radio" name="star_a" class="star-5" id="star_a-5" />
<label class="star-5" for="star_a-5">5</label>
<span></span>
</div>
<div class="stars">
<input type="radio" name="star_b" class="star-1" id="star_b-1" />
<label class="star-1" for="star_b-1">1</label>
<input type="radio" name="star_b" class="star-2" id="star_b-2" />
<label class="star-2" for="star_b-2">2</label>
<input type="radio" name="star_b" class="star-3" id="star_b-3" />
<label class="star-3" for="star_b-3">3</label>
<input type="radio" name="star_b" class="star-4" id="star_b-4" />
<label class="star-4" for="star_b-4">4</label>
<input type="radio" name="star_b" class="star-5" id="star_b-5" />
<label class="star-5" for="star_b-5">5</label>
<span></span>
</div>
</form>