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

plopesc’s picture

Status: Active » Fixed

Hello
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

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Anonymous’s picture

Issue summary: View changes

forget to close a div