''); $options['content_field'] = array('default' => ''); $options['description_field'] = array('default' => ''); return $options; } function options_form(&$form, &$form_state) { parent::options_form($form, $form_state); // Pre-build all of our option lists for the dials and switches that follow. $fields = array('' => t('')); foreach ($this->display->handler->get_handlers('field') as $field => $handler) { if ($label = $handler->label()) { $fields[$field] = $label . ' ' . $handler->options['format']; } else { $fields[$field] = $handler->ui_name(); } } $form['title_field'] = array( '#type' => 'select', '#title' => t('Title field'), '#options' => $fields, '#default_value' => $this->options['title_field'], '#description' => t('Select the field that will be used as the title field.'), ); $form['content_field'] = array( '#type' => 'select', '#title' => t('Content field'), '#options' => $fields, '#default_value' => $this->options['content_field'], '#description' => t('Select the field that will be used as the content.'), ); $form['description_field'] = array( '#type' => 'select', '#title' => t('Description field'), '#options' => $fields, '#default_value' => $this->options['description_field'], '#description' => t('Select the field that will be used as the description.'), ); } }