You're right - overriding <background-color-view:> was unnecessary,
and actually gets in the way.

Just the following three lines (plus the js file for the plugin
itself, of course) gives working color-pickers for all fields on a
page with 'color' in their names

  <javascript name="jquery.simple-color"/>
  <script>
    jQuery('input[name*="color"]').simpleColor();
  </script>

Thanks, Bob! This was driving me nuts yesterday.
Paul


On Jan 8, 1:44 am, Bob Sleys <[email protected]> wrote:
> Looking at the jquery color picker docs I found this
>
> $('#colorpickerField1, #colorpickerField2, #colorpickerField3').ColorPicker({
>         onSubmit: function(hsb, hex, rgb, el) {
>                 $(el).val(hex);
>                 $(el).ColorPickerHide();
>         },
>         onBeforeShow: function () {
>                 $(this).ColorPickerSetColor(this.value);
>         }})
>
> .bind('keyup', function(){
>         $(this).ColorPickerSetColor(this.value);
>
> });
>
> Based on this you just need to sub class names in the first line to match
> the class name of your text box ie simple_color and eliminate the two extra
> fields they used in their example.  If done properly your background-color
> input but will update when you change the color and thereform change the
> value that get saved.  However you don't even need the
> <background-color-view:> tag since the color picker ties into any text
> input box you just need to know what the input box's id or class is and
> pass it off to the color picker.  Hobo automaticly gives each field a
> unique ID so just use it, inspect the html if you need to.
>
> Bob

-- 
You received this message because you are subscribed to the Google Groups "Hobo 
Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/hobousers?hl=en.

Reply via email to