Advertisement
siriusb

contact site form alter

Feb 14th, 2013
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.45 KB | None | 0 0
  1. function MYTHEME_form_contact_site_form_alter(&$form, &$form_state, $form_id){
  2.     /* Contact form tárgy mező kitöltés   */
  3.     if (isset($_GET['ta'])){
  4.         if (is_numeric($_GET['ta'])){
  5.             $ta_id = $_GET['ta'];
  6.             $ta = node_load($ta_id);
  7.             $form['subject']['#value'] = $ta->title;
  8.         }
  9.         else {
  10.             drupal_set_message(t('Ne turkálj az URL-ben, nem szép dolog.'), 'error');
  11.         }
  12.     }  
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement