You are here

function ad_owners_add_form in Advertisement 5

Same name and namespace in other branches
  1. 6.3 owners/ad_owners.module \ad_owners_add_form()
  2. 6 owners/ad_owners.module \ad_owners_add_form()
  3. 6.2 owners/ad_owners.module \ad_owners_add_form()
  4. 7 owners/ad_owners.module \ad_owners_add_form()

A simple form for adding new users as owners of ads.

1 string reference to 'ad_owners_add_form'
ad_menu in ./ad.module
Implementation of hook_menu().

File

./ad.module, line 1409
An advertising system for Drupal powered websites.

Code

function ad_owners_add_form($node) {
  $form = array();
  drupal_set_title('Add owner');
  $form['aid'] = array(
    '#type' => 'value',
    '#value' => $node->nid,
  );
  $form['username'] = array(
    '#autocomplete_path' => 'user/autocomplete',
    '#description' => t('Enter the username of the user who should have ownership permissions on this advertisement.'),
    '#required' => TRUE,
    '#type' => 'textfield',
    '#title' => t('Username'),
  );
  $form['save'] = array(
    '#type' => 'submit',
    '#value' => t('Add owner'),
  );
  return $form;
}