Add color picker to a form
I found this color picker
What's the easiest way to do that?
I think the basic idea is you create a form and add a normal textbox field to it.
The tricky part is going to be that you need to find out the id of the textbox that was added to the form block -- you will need to use Firebug (a free firefox addon) or the Web Inspector in Safari or Chrome, or just "view source" and find it. You need to do this after you have created the form and added it to a page, because it will be a different id for every form block, so you don't know what the id will be until after it's added.
Also note that you will need to do this for every form that's added (not a problem if you only have one of these forms on your site, but if you want people to be able to create new forms with this a lot in the future, this will not be a very practical method).
Best of luck.
<input class="color"> Will be placed in the html, where I find my form in firebug right?
When I find the spot in firebug to my form, how do I find that codes in concrete5?
Also, please let me know how familiar you are with the following things:
* Concrete5 Themes
If I know those things I can give you a better answer
Concrete5 Themes (I have made my own, but don't know to much about it)
PHP (I use it, but don't know to much about it)
So instead of bending the form block to do what we want, we need to bend our own approach around how the form block already works.
The easiest way to do this (and something I've done in projects before) is to add the block to a page, make sure you include a textbox field that will eventually become the color picker (but for now it's just a textbox, nothing special), and then after it's been added to the page (and you exit edit mode), view the source of the page (or firebug/inspect it) and find out what "name" has been assigned to it (the form block assigns unique names to every field that it outputs) -- for example, "Question22".
Now, we have a problem here because unlike most jquery plugins that let you specify the dom elements to apply the effect to, this one you are using seems to have hardcoded the 'class="color"' thing (which, again, we can't rely on existing because c5's form block doesn't let use change how the fields out outputted). So unfortunately it's going to be complicated to use the color picker you've chosen. It's possible but the instructions will take me way too long to write out here. So what I suggest is you google for "jquery color picker" and find one that looks decent (I'm sure there are tons to choose from).
One you have that picked out and downloaded, the code you'd add above </head> is something like this:
Note that I'm assuming the textbox field's name is "Question22", but obviously you need to change this to match what YOUR form's textbox name is.
Thank you for all your help, I understand all you have been written except of these codes here:
I guess I have to replace /jquery.some-imaginary-color-picker.js ?
And does this .imaginaryColorPicker have anything to do with above?
I have found many different color pickers, but can't quite see how to combine the codes from them with yours.