You are here

function faqfield_field_create_field in FAQ Field 7

Implements hook_field_create_field().

File

./faqfield.module, line 108
FAQ Field Provides a field for frequently asked questions.

Code

function faqfield_field_create_field($field) {
  if ($field['type'] == 'faqfield') {

    // Here we want to set a default cardinality of
    // unlimited after a faqfield was created.
    $field['cardinality'] = FIELD_CARDINALITY_UNLIMITED;
    field_update_field($field);
  }
}