Quaid
Quaid

Reputation: 333

CCK field with multiple fields inside

im new on drupal and im having a problem with CCK fields.

I made a custom cck field and the install schema its like this:

function usig_location_field_schema($field) {
  return array(
    'columns' => array(
      'location_cck_usig' => array(
        'type' => 'varchar',
         'length' => 255,
         'not null' => FALSE,
      ),
      'lat_cck_usig' => array(
        'type' => 'varchar',
         'length' => 255,
         'not null' => FALSE,
      ),
      'lon_cck_usig' => array(
        'type' => 'varchar',
         'length' => 255,
         'not null' => FALSE,
      ),
    ),
  );
}

But when i save the new content .. drupal crash with this log :

Fatal error: Cannot create references to/from string offsets nor overloaded objects in /includes/common.inc on line 6392

So .. i know that im doing something wrong. I just dont know which hook use to save the fields.. (its possible save various fields at once ?)

Thx for all and sry for my english

Upvotes: 0

Views: 393

Answers (1)

Pan Chrono
Pan Chrono

Reputation: 420

You can always use this great module called Field Collection

Cheers

Upvotes: 1

Related Questions