XF 2.2 Creating a color picker option

DrCustUmz

Active member
I am creating an addon that I have managed to get working using style properties, although the options appear for it under every single style, but only editing the values within the master style has any effect.

Now these options are not a per theme type of option but do effect color, although only being able to edit them within the master style is not very user friendly. So I was thinking how about moving all these color options into their own options page instead of using the style properties page.

Is there a way I can create a color picker type option for more product? Meaning having the same type of color picker available in style properties, but within a normal option page. Or am I over thinking this and should keep my options in the style properties page...
 
I could simply make it an input field, but I really like the idea of allowing the user to select any color easily.
 
You’d be better off using a style property versus an option. That way the user can have different colors on different styles.

Setting a color with an option might not show good on all styles.
 
but for my purposes (which without spoiling, you should know what it is lol) there will not be different style applications for. you only need to define one instance and everything will be set, so the way it is currently setup just doesn't make sense.

That's why I was kind of leaning toward just implementing an option section, but I would hate to loose the color picker, I will send you a copy.
 
I believe it would be a pain to set up as an option. IIRC, the option would need to be set up with "Named Template" and include all the necessary mark up and JS.
 
Back
Top Bottom