Styling form controls has always been limited with HTML and CSS. Not anymore. FancyForm provides the solution by letting you style checkboxes and radio buttons as you would any other elements, while degrading gracefully on older and non-graphical browsers.
Here’s an example of what’s possible with the script:
![FancyForm styled checkboxes, before and after [styled checkboxes]](http://lipidity.com/images/fancy-20070828-190448.png)
Not only does it let you style the checkboxes, you can also add your own custom JavaScript hooks, events, effects and a whole lot more.
Find out more and please let me know of any bugs or possible ideas, or jump straight to the demo.
18 Comments so far
Leave a commentVery nice.
It’s definitely something I hope to see more of in the future.
uttered by Gareth on August 28, 2007 9:03 pm | Permalink
Very nice, clever solution
Maybe i come back to steal something ..
J.
revealed by Jasper on August 28, 2007 11:24 pm | Permalink
Doesn’t work in IE
reasonded by aer on August 29, 2007 6:54 am | Permalink
Looks great, I remember reading about this not to long ago. I forgot about it and I just might happen to have a use for it now.
Possibly the best part of the post is your use of Skitch for the image! That text looks awfully Skitchy =)
I’m a new fan for your blog. Keep posting exciting stuff!
written by Joseph Pecoraro on August 29, 2007 9:18 am | Permalink
This method was released about 2 years ago:
http://www.flog.co.nz/index.php/journal/arc-adams-radiocheckbox-customisation/
proclaimed by Mark on August 29, 2007 2:34 pm | Permalink
@Mark, it doesn’t work in Safari .. this does:-)
professed by Jasper on August 30, 2007 12:52 am | Permalink
Thank you.
There have been quite a few complaints about IE support (namely the lack of), but I don’t actually have IE, so if anyone could provide some assistance regarding what the errors are, that’d be fantastic.
recorded by Ankur on August 30, 2007 7:46 am | Permalink
Line 1, Char 1:
Invalid property value
Line 61, Char 5:
Object doesn’t support this property or method
voiced by Garth Kidd on August 31, 2007 12:41 pm | Permalink
Very cool… although I’m no interface expert, I’m feeling both the checkbox and radio button to be way too small and perhaps unrecognizable as checkboxes and radio buttons. Can they be scaled up or slightly redesigned?
spoken by Gui on September 11, 2007 3:25 pm | Permalink
Thanks Garth. I’ll leave it someone more patient than myself to figure out the issues with IE.
GUI, the checkbox + radio are only there in the example. When this is actually used, you get to style it yourself.
proclaimed by Ankur on September 11, 2007 4:08 pm | Permalink
on line 62 of moocheck.js
change e.preventDefault(); // fix for labels
to
if (typeof e.preventDefault == ‘function’)
e.preventDefault(true);
else if (typeof e.returnValue == ‘function’)
e.returnValue(true);
This should fix any errors in IE 6 and 7
revealed by Alan on September 14, 2007 12:31 am | Permalink
Awesome
will use this seen as it uses MooTools
mentioned by James on September 23, 2007 5:22 am | Permalink
Anyone have an idea how to get this to work with Fancyform checkboxes?
http://moo.floor.ch/examples/formcheck/
disclosed by Mike on October 3, 2007 12:39 am | Permalink
Mike, the instructions should still work. Just add the script tags (but not mootools since you’ve already got that loaded) and it should work just like that.
determined by Ankur on October 4, 2007 10:38 am | Permalink
FancyForm works just fine. The formcheck script does not.
The tip/error bubble does not work on checkboxes when FF is present. No errors are thrown in Firebug.
voiced by Mike on October 4, 2007 7:17 pm | Permalink
I finally got an error as to why it does not work.
Can’t move focus to the control because it is invisible, not enabled, or of a type that does not accept the focus.
mentioned by Mike on October 17, 2007 1:02 am | Permalink
Really slick, thank you!. The only issue I have with it is the onSelect event. If you have a checkbox that is initially in a selected state, the event fires when FancyForm is initialized. For example, if you wanted to use an XHR on select, it will fire before it is clicked on to change state. I was able to overcome this by using a variable for page init, and only to execute the onSelect code after the initial render.
published by Kurt on October 24, 2007 3:03 am | Permalink
Leave a comment