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
});
});