Skip to content

Add colorpicker control to a form with jscolor#17

Open
Harmo80 wants to merge 4 commits into
stefangabos:masterfrom
Harmo80:master
Open

Add colorpicker control to a form with jscolor#17
Harmo80 wants to merge 4 commits into
stefangabos:masterfrom
Harmo80:master

Conversation

@Harmo80
Copy link
Copy Markdown

@Harmo80 Harmo80 commented Feb 4, 2015

Hello !

I achieve to include the colorpicker control and jscolor script ( http://jscolor.com/ ) to Zebra_Form. It works well but It could be improved.
The main class is Colorpicker.php : It's just a copy of Text.php with a bit of modifications.
I add some CSS rules and some images.
And I put the jscolor script at the bottom of zebra_form.src.js file. The path to the images are in this script, that's the problem... :/

To add a colorpicker in a form :
$form->add("colorpicker", "my_colorpicker");
The value submitted is the hexadecimal code without the "#" (ex : A2A2A2).

Hope you accept this pull request ! ;D

Harmo

Adding the Colorpicker.php control class
Adding the jscolor script and make it run with Zebra_Form
Adding css rules for the new control and images dependencies on the
public directory
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant