Jump to content

Radio Button Color On/Off


danjesama

Recommended Posts

Hi Guys, 

I have a table that shows information and the status of that, being on or off. the on and off part is hard to notice and as it is the most valuable I was hoping to change it from simple text of on/off to a green/red circle.  At the moment I am using a text input in a form for on/off. I have looked around and haven't found much related to this. I am having to replace the text input box with the radio button and if its clicked it will show green and if not it will show red. any suggestions on this? I will attach my code below:

input form:

<th>Repo Status: * <td><input type="text" name="status" value="<?php echo $status; ?>" /></td></tr>

Displayed Table:

echo '<td>' . $row['status'] .'</td>';

 

Thanks in advance

Edited by danjesama
Link to comment
Share on other sites

You are very limited on what you can do with input such as radio button and that is why customized character encoded or sprite images are used. CSS identify what state it is in, then the customized alternative is placed under the hidden radio button.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...