Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add colorpicker control to a form with jscolor #17

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

Harmo80
Copy link

@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.

None yet

1 participant