Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- // $Id$
- /**
- * @file
- * Drupal Module: form_corrections
- * Adds custom code specific to this Drupal 6 site.
- */
- /**
- * Implementation of hook_form_alter().
- */
- function form_corrections_form_alter(&$form, &$form_state, $form_id) {
- print $form_id;
- switch ($form_id) {
- //case 'story_node_form':
- // $form['menu']['#access'] = 0;
- //break;
- case 'alert_node_form':
- // remove some unwanted node editing fields
- $form['revision_information']['#access'] = 0;
- $form['menu']['#access'] = 0;
- $form['author']['#access'] = 0;
- // override node options permissions defined by 'administer nodes'
- $form['options']['#access'] = 1;
- $form['options']['status']['#access'] = 1;
- $form['options']['promote']['#access'] = 0;
- $form['options']['sticky']['#access'] = 0;
- // Taxonomy Term Changes
- $form['taxonomy']['16']['#required'] = TRUE;
- $form['taxonomy']['16']['#multiple'] = TRUE;
- $form['taxonomy']['16']['#description'] = t("Please select the type(s) of Alert that you wish to post. You may select more than one type if they apply to your post ('ctrl'+'select').");
- $form['taxonomy']['16']['#title'] = t('Alert Type');
- // Unsetting options in the forum select box (taxonomy term select) that aren't applicable to the 'Alert' content type
- unset($form['taxonomy']['16']['#options']['']);
- unset($form['taxonomy']['16']['#options']['0']);
- unset($form['taxonomy']['16']['#options']['7']);
- unset($form['taxonomy']['16']['#options']['8']);
- unset($form['taxonomy']['16']['#options']['9']);
- //
- // $form['taxonomy']['16']['#options']['1']['option']['139'] = t('Buy It Now');
- break;
- }
- $form['form_array'] = array(
- '#value' => '<pre>'. print_r($form, 1) .'</pre>',
- '#weight' => '99',
- );
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement