Fix for Alteration to Trying to alter contact form to allow pre-selecting of cid

  1. function contactalter_form_contact_site_form_alter(&$form, &$form_state) {
  2.   dsm($form); //This is currently appearing on every page from 'page =>' downwards
  3.   $new_category='1'; //test code. replace with: check_plain($_GET['cid']);
  4.   if (!empty($new_category)) {
  5.     $form['cid']['#default_value'] = $new_category;
  6.   }
  7. }

Submit Fix

Any tags you'd like to associate with your code, delimitered by commas (example: Views, CCK, Module, etc).
Select the syntax highlighting mode to use.