Color Picker Extension

Color Picker Extension

Postby jeffrydell » Fri Dec 19, 2008 11:41 pm

This is a "truly brand-new" request. The extensions included in phpMaker are great - I use most of them and they save a TON of time.

In developing a phpMaker-constructed CMS, I'm finding that it would be nice to incorporate a color-picker for setting up themes.


Color Picker

Postby Piosky_to2003 » Tue May 31, 2016 6:52 pm

in custom view tag (google map , barcode, you tube) it would be useful to have a ColorPicker tool for choose a color in a texbox
textbox Colorforsupplier --> choose with colorpicker--> #234211 <---
Posts: 22
Joined: Thu Feb 21, 2013 1:04 am

Re: Color Picker Extension

Postby BillyG » Mon Aug 01, 2016 5:17 pm

Very useful feature!

For the moment, I have solved it by customizing the Edit-Page template (Custom template) with code like this (the 3rd table line):

<table class="colortable">
<td>Type<span class="ewRequired">&nbsp;*</span></td>
<td>{{{value Type}}}</td>
<td>Days<span class="ewRequired">&nbsp;*</span></td>
<td>{{{value Days}}}</td>
<td>RGB<span class="ewRequired">&nbsp;*</span></td>
<td><span id="el_enddatecolor_sRGB">
<input type="color" data-table="enddatecolor" data-field="x_sRGB" name="x_sRGB" id="x_sRGB" value="<?php echo CurrentPage()->sRGB->CurrentValue; ?>" size="30" maxlength="7" placeholder="RGB" class="form-control" data-toggle="tooltip" title="Hex Color with # like #ff00ff" style="width: 100px; height: 50px;"></span></td>

It works on many modern browsers showing a native system color picker and show an text input box as fall back.
Posts: 26
Joined: Tue Dec 04, 2012 11:56 pm

Re: Color Picker Extension

Postby Webmaster » Fri Jul 28, 2017 12:25 pm

See the Custom Edit Tag example in v2018.
Posts: 10731
Joined: Fri Aug 06, 2004 5:59 pm

Re: Color Picker Extension

Postby ross_t » Tue Oct 10, 2017 10:48 am

It's very easy to implement the color picker from Server and Client events. Add required js and CSS from Page Head event. Then add specific class to the text box from field's custom attributes. Lastly, add jquery code to bind color picker with your text box.
Posts: 28
Joined: Fri Sep 30, 2016 2:00 am

Return to Feature Requests (PHPMaker)