Hi guys, Looking for some help here. I've currently got a form with several different options to select with radio buttons, and they will then be sent via a submit button. But instead of radio buttons, I would like to do something like on here: http://consoles.freebiejeebies.co.uk/ Where each items is a clickable cell which will change the form selection, rather than just a radio button. Any ideas how to do this? + rep for any help
iT CAN BE done via ajax, or jquery, or simple js I recommend jquery they have nice examples on their site easy to use
Crivion - many thanks for your input. I'm an absolute disaster when it comes to jscript. I did take a look at jquery and also facebox - and thought it could be done with that, but didn't have a clue how. You got any pointers as to where I could start on this? I guess I'd be looking to integrate the form in the jquery/facebox?
yeah. this belongs in javascript. http://consoles.freebiejeebies.co.uk/ uses jquery - there are plenty of ways of coding this the semantic way would be elements in a shape like... <form action="blah"> <input type="hidden" id="mySelect" name="mySelect" value="" /> // define the css... for the class bellow as width, height, border, padding, float left, cursor pointer etc. // populate this from a DB as a loop or whatever <div class="myFormSelect" style="background-image: url(someimage.gif);" data-option="1"></div> <div class="myFormSelect" style="background-image: url(someimage2.gif);" data-option="2"></div> ... <div class="myFormSelect" style="background-image: url(someimage10.gif);" data-option="10"></div> // in js for jquery (may need some tweaking, i dont code for jquery but i cant be arsed to look it up, it ought to work): $(".myFormSelect").click(function() { $("#mySelect").value = this.attr("data-option"); // will assign the value of the image picked }); PHP: thats the general idea. plugins in jquery that can do similar things: http://www.no-margin-for-errors.com/projects/prettyCheckboxes/ (just found it in google).
Dimitar, many thanks. I'll try and make sense of that prettycheckboxes plugin, it looks just like the kind of thing I need. Will get back to you on whether or not I understand it - that's a totally different story