maelle

gform_pre_submission_filter

Oct 12th, 2011
201
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. / add conditional logic for the notification message
  2. add_filter('gform_pre_submission_filter_1', 'conditional_message');
  3. function conditional_message($form){
  4. }
  5.  
  6. // append a different html text for payment options
  7. if($choice1)
  8. $form['autoResponder']['message'] .= "<p>Here I insert Text 1</p>";
  9. if($choice2)
  10. $form['autoResponder']['message'] .= "<p>Here I insert Text 2</p>";
  11.  
  12. // return modified form
  13. return $form;
  14.  
RAW Paste Data