Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Now the html is directly set like that:
$element[$delta]['#markup'] = '<div class="jquery_colorpicker_text_display"><span class="jquery_colorpicker_hash_mark">#</span>' . $item['jquery_colorpicker'] . '</div>';
it would be way better to create a theme function and implement like that
'#theme' => 'mymodule_theme_sample_field_formatter_themeable', //or use an core theme...
'#data' => $item['value'],
'#some_setting' => $settings['some_setting'],
Look at the example at http://api.drupal.org/api/drupal/modules!field!field.api.php/function/ho...
Comments
Comment #1
plopescHello
I created some them functions for the formatter. Then it could be changed or rewritten.
http://drupalcode.org/project/jquery_colorpicker.git/commit/5567cc7
Thanks
Comment #2.0
(not verified) CreditAttribution: commentedforget to close a div