I'm using this article as a reference for creating a custom CCK module.

http://drupal.org/node/106716

Basically my end goal is to have a field with rate, season, frequency and dates as one group field for a real estate site and you can add more lines easily. There's no current module that I could find that let's you group dropdowns and text fields into one field.

I have created a new column in the database for each field, ie. rate, season, etc.

I've got the form part of the widget working and saving correctly. My question is how do I make it render when you view the node? Is there no default behavior? I thought maybe it would spit out the fields with a label like it does when you add a text or number field.

What function gets called when you view the node? I thought it was the _field() hook but I put a die statement and nothing happened. Please help!

Comments

drupalninja99’s picture

For the life of me I can't find where to render the custom CCK field I created.

drupalninja99’s picture

Ahhhh!!!!?!

drupalninja99’s picture

drupalninja99’s picture

I can't figure out when it's called, I would think either when the node is saved or viewed but I can't seem to get the event to fire off.

drupalninja99’s picture

http://drupal.org/node/278875

I can't get the display fields dropdown to populate. Here is my code:

function cck_rental_rate_field_formatter_info() {
  /**
   * @todo do I need to add format options?? only needed for views
   */
  return array(
    'default' => array(
      'label' => 'Default',
      'field types' => array('text'),
    ),
    'plain' => array(
      'label' => 'Plain text',
      'field types' => array('text'),
    ),
    'trimmed' => array(
      'label' => 'Trimmed',
      'field types' => array('text'),
    ),
  );

But nothing is populating, is there some place else that's keeping it from populating?!?