FancyForm - Pretty checkboxes and radios


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:

[styled checkboxes]

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.


Back to Top ↑

18 Comments so far

Leave a comment
  1. 1

    Very nice.

    It’s definitely something I hope to see more of in the future.

  2. 2

    Very nice, clever solution
    Maybe i come back to steal something ..

    J.

  3. 3

    Doesn’t work in IE

  4. 4

    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!

  5. 5

    This method was released about 2 years ago:
    http://www.flog.co.nz/index.php/journal/arc-adams-radiocheckbox-customisation/

  6. 6

    @Mark, it doesn’t work in Safari .. this does:-)

  7. 7

    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.

  8. 8

    Line 1, Char 1:
    Invalid property value

    Line 61, Char 5:
    Object doesn’t support this property or method

  9. 9

    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?

  10. 10

    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.

  11. 11

    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

  12. 12

    Awesome :) will use this seen as it uses MooTools

  13. 13

    Anyone have an idea how to get this to work with Fancyform checkboxes?

    http://moo.floor.ch/examples/formcheck/

  14. 14

    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.

  15. 15

    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.

  16. 16

    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.

  17. 17

    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.

RSS feed for comments on this post. TrackBack URI

Leave a comment

Comments may be edited for formatting.