How could I have radio button value as a images

Hi All,

   I need to have a image as a value to radio button.

   i.e: If I choose a Sex as a male, some list of types in radio button have to display along with the image of each type.

   As like as male, for choosing female also some list of types in radio button have to display along with the image of each type.

  How could I specify image as a value for radio button in join form.

  Thanks in Advance.

Quote · 11 Apr 2014

You can use label to wrap your radio buttons and icons, the rest is CSS:

http://jsbin.com/awelaw/1/edit


<label class="fb" for="fb1">

      <input id="fb1" type="radio" name="fb" value="big" />

      <img src="icons/fb_big.png">

 

  </label>


CSS:

.fb > input[type=radio]{

  display:none;

}

input[type=radio] + img{

  cursor:pointer;

  border:2px solid transparent;

}

input[type=radio]:checked + img{

  border:2px solid #f00;

 

}

http://boonexpert.com
Quote · 11 Apr 2014

Thanks for your reply.

 Which files I have to edit this coding to display in the join form.

Quote · 12 Apr 2014
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.