@baraka43 - to hide a radio button, you need this CSS:
[css]
.gform_wrapper ul.gfield_radio li input[type="radio"] {
display:none;
}
Add that to your theme's style.css or custom.css if appropriate. That will hide the radio button.
I added the images in the field labels like this:
<img src="http://gravity.chrishajer.com/wp-content/themes/twentyeleven/images/flags/png/es.png" /> Spain
<img src="http://gravity.chrishajer.com/wp-content/themes/twentyeleven/images/flags/png/cn.png" /> China
<img src="http://gravity.chrishajer.com/wp-content/themes/twentyeleven/images/flags/png/us.png" /> United States
<img src="http://gravity.chrishajer.com/wp-content/themes/twentyeleven/images/flags/png/ir.png" /> Ireland
<img src="http://gravity.chrishajer.com/wp-content/themes/twentyeleven/images/flags/png/cg.png" /> Congo
<img src="http://gravity.chrishajer.com/wp-content/themes/twentyeleven/images/flags/png/sn.png" /> Senegal
(for usability, you might want to include alt tags. maybe dimensions too, for layout)
You're going to want to check the box "enable values" as well, because without it, that full img tag will be the submitted value in your admin, which is probably not what you want. I entered values like this:
Spain
China
USA
Ireland
Congo
Senegal
That's all I needed to do for the setup.
That gave me a little bit of a usability problem though:
http://gravity.chrishajer.com/2011/07/22/where-are-you-from/
It's hard to tell which item was "selected" without the feedback of filling in the button. You might have to add some additional CSS or JavaScript to actually indicate which radio button (flag) was selected. Your use case may be different. If you need additional help beyond hiding the radio button, please let us know.
Thanks.
Posted 13 years ago on Saturday July 23, 2011 |
Permalink