Jump to content


GroceryCRUD and jQuery ColorPicker

jquery plugins javascript forms

  • Please log in to reply
No replies to this topic

#1 yadul

yadul

    Newbie

  • Members
  • Pip
  • 1 posts

Posted 09 March 2015 - 08:49 PM

Hello everybody, I'm trying to put a jQuery ColorPicker plugin into a add/edit form inside GroceryCRUD. No errors reported in console but the color selection dialog did not appear. Only some controls below the page footer. Nothing else.

 

My code:

 

The callback funtion to fill the color code...

 

function color_callback($value = '', $primary_key = null) {
        $result = '<input id="field-color" style="width:100px;" name="color" value="' . (($value) ? $value : '') . '" maxlength="7" type="text">';

        return $result;
    }
 

The script...

 

$(function () {
    $('#field-color').colorpicker({
        parts: 'draggable',
        showCloseButton: false,
        modal: true,
        showCancelButton: false,
        closeOnEscape: false
    });
});

 

 







Also tagged with one or more of these keywords: jquery, plugins, javascript, forms

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users