You are here

function ad_owners_add_form in Advertisement 6.3

Same name and namespace in other branches
  1. 5 ad.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_owners_menu in owners/ad_owners.module
Implementation of hook_menu().

File

owners/ad_owners.module, line 307
Enhances the ad module to support ad owners.

Code

function ad_owners_add_form($form_state, $node) {
  $form = array();
  drupal_set_title(t('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;
}