Can a colorpicker be added to the mod_form page

Re: Can a colorpicker be added to the mod_form page

by Ravi kumar -
Number of replies: 0


I tried your given solution but it not working, i also want to add color picker in moodle form_setting page.
our effort is as-

$PAGE->requires->js( new moodle_url($CFG->wwwroot . '/lib/javascript-static.js'));
$mform->addElement('text', 'color', get_string('colorpicker', 'congrea'),array(''id'=> 'clour'));
$mform->addElement('html', '<div class="admin_colourpicker">');
$PAGE->requires->js_init_call('M.util.init_colour_picker', array('clour', 'null'));