I think this is a cool field formatter but when you want to use it with another field formatter you have problems. I guess that it would be very cool to rewrite the module so that it based on Field Formatter Settings. So that you just alter the other field formatters.
In Drupal 8 you will get this in core #945524: Field formatter settings hooks in core.

I think we should open a new branch (7.x-2.x) for this step. Do you agree?

Comments

yannickoo’s picture

technikh’s picture

Assigned: Unassigned » technikh

interesting. will look into it.

technikh’s picture

Version: 7.x-1.x-dev » 7.x-2.x-dev
Assigned: technikh » Unassigned
Status: Active » Fixed

Created a new 2.x version that depends on Field Formatter Settings. http://drupalcode.org/project/simple_field_formatter.git/blob/refs/heads...

Prefix & Suffix work for all field types

if (!empty($custom_suffix)) {
 115               $element[$delta]['#suffix'] = $custom_suffix;
 116             }
 117             if (!empty($custom_prefix)) {
 118               $element[$delta]['#prefix'] = $custom_prefix;
 119             }

Other functions only work for Field of type text

if(isset($item['safe_value'])){
  95               $original_value = $item['safe_value']; // Getting the actual value
$element[$delta]['#markup'] = $modified_value;

Status: Fixed » Closed (fixed)

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

Anonymous’s picture

Issue summary: View changes

Added description.