''); $options['data'] = array('default' => ''); $options['extra'] = 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['nid'] = array( '#type' => 'select', '#title' => t('Nid field'), '#options' => $fields, '#default_value' => $this->options['nid'], '#description' => t('Select the field that will be used as the title field.'), '#required' => true, '#weight' => 0, ); $form['data'] = array( '#type' => 'select', '#title' => t('Content field'), '#options' => $fields, '#default_value' => $this->options['data'], '#description' => t('Select the field that will be used as the content.'), '#required' => true, '#weight' => 1, ); $form['extra'] = array( '#type' => 'select', '#title' => t('Extra field'), '#options' => $fields, '#default_value' => $this->options['extra'], '#description' => t('Select the field that will be used as the description.'), '#weight' => 2, ); } }