Creating a Custom Formatter I'm learning to develop for Drupal 7 and figured I'd start with something simple, like a custom formatter.  I have a content type that contains several boolean fields indicating if the content type belongs to certain class of objects. When I create a view of the content types, all the boolean fields show a 1 or a 0, when I would like it to display an image instead.  I created the following CheckBoxFormatter.module file

    &lt;?PHP
        /**
         * @file
         * Creates a custom format for boolean fields, a checked checkbox for true 
         * and unchecked for false
         */

        /**
         * Implements hook_field_formtatter_info()
         */
        function CheckBoxFormatter_field_formatter_info() {
            return array(
                'CheckBoxFormatter' =&gt; array(
                    'label' =&gt; t('Checkboxes'),
                    'field types' =&gt; array('boolean')
                ),
            );
        }

        /**
         * Implements hook_field_formatter_view()
         */
        function CheckBoxFormatter_field_formatter_view($obj_type, $object, $field, $instance, $langcode, $items, $display) {
            $elements = array();
            foreach($items as $delta =&gt; $item) {

                //Build variables array for formatter
                $element = array(
                    '#obj_type' =&gt; $obj_type,
                    '#object' =&gt; $object,
                    '#field' =&gt; $field,
                    '#instance' =&gt; $instance,
                    '#langcode' =&gt; $langcode,
                    '#items' =&gt; $items,
                    '#display' =&gt; $display
                );

                if (function_exists($function = "{$display['module']}_field_formatter_{$display['type']}")) {
                    $elements[$delta] = array(
                        '#markup' =&gt; $function($element)
                    );
                }
            }
            return $elements;
        }

        /**
         *  creates the actual checkboxes
         */
         function CheckBoxFormatter_field_formatter_CheckBoxFormatter($variables) {
             $img = array("&lt;URL TO UNCECKED&gt;","&lt;URL TO CHECKED&gt;");
             $disp = array("Unchecked","Checked");

             $element = array();
             foreach($variables['#items'] as $delta =&gt; $item) {
                 $element[$delta] = array(
                     '#markup' =&gt; '&lt;img src="' . $img[$item['value']] . '" alt="' . $disp[$item['value']] . '" /&gt;'
                 );
             }

             return $element;
         }


I uploaded this to all/sites/modules/CheckBoxFormatter.  I was able to activate the module in the modules section of my drupal site.   Now, when I go back to the view I created, this new formatter doesn't show up.  I also do not see it as an option under Manage Display for the content type.  What am I doing wrong?
Finally found it. I knew it had to be something simple.  I was using the wrong field type. Turns out it should have been list_boolean instead of simply boolean.  I also simplified the code

    &lt;?PHP
        /**
         * @file
         * Creates a custom format for boolean fields, a checked checkbox for true 
         * and unchecked for false
         */

        /**
         * Implements hook_field_formtatter_info()
         */
        function CheckBoxFormatter_field_formatter_info() {
            return array(
                'checkboxes' =&gt; array(
                    'label' =&gt; t('Checkboxes'),
                    'field types' =&gt; array('list_boolean')
                ),
            );
        }

        /**
         * Implements hook_field_formatter_view()
         */
        function CheckBoxFormatter_field_formatter_view($obj_type, $object, $field, $instance, $langcode, $items, $display) {
            $output = array();
            $img = array("uncheck.jpg","check.jpg");
            $disp = array("Unchecked","Checked");


            if($display['type'] == "checkboxes") {
                foreach($items as $delta =&gt; $item) {
                    $output[$delta] = array(
                        '#markup' =&gt; '&lt;img src="' . $img[$item['value']] . '" alt="' . $disp[$item['value']] . '" /&gt;'
                    );
                }
            }
            return $output;
        }