You are here

function biblio_contributor_form in Bibliography Module 7

Same name and namespace in other branches
  1. 7.2 biblio.module \biblio_contributor_form()
1 call to biblio_contributor_form()
biblio_contributor_widget in ./biblio.module

File

./biblio.module, line 1552
Bibliography Module for Drupal.

Code

function biblio_contributor_form($contributor, $options) {
  $form = array(
    '#tree' => TRUE,
  );
  $form['name'] = array(
    '#type' => 'textfield',
    '#maxlength' => 255,
    '#autocomplete_path' => 'biblio/autocomplete/contributor',
    '#default_value' => isset($contributor['name']) ? $contributor['name'] : '',
  );
  $form['auth_category'] = array(
    '#type' => 'select',
    '#default_value' => isset($contributor['auth_category']) ? $contributor['auth_category'] : '',
    '#options' => $options['categories'],
    '#multiple' => FALSE,
  );
  $form['auth_type'] = array(
    '#type' => 'select',
    '#default_value' => isset($contributor['auth_type']) ? $contributor['auth_type'] : '',
    '#options' => $options['roles'],
    '#multiple' => FALSE,
  );
  $form['cid'] = array(
    '#type' => 'hidden',
    '#default_value' => isset($contributor['cid']) ? $contributor['cid'] : '',
  );
  $form['rank'] = array(
    '#type' => 'textfield',
    '#size' => 6,
    '#default_value' => isset($contributor['rank']) ? $contributor['rank'] : '',
  );
  return $form;
}