Advertisement
maelle

Untitled

Oct 28th, 2011
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. // add conditional logic for the GForm notification message
  2. add_filter('gform_pre_submission_filter_1', 'conditional_message');
  3. function conditional_message($form){
  4.  
  5. // define field IDs for conditional logic
  6. $choice1 = RGForms::post('input_49.1');
  7. $choice2 = RGForms::post('input_48.1');
  8.  
  9. // append a different html text for payment options
  10. if($choice1)
  11. $form['autoResponder']['message'] .= "Message 1";
  12. if($choice2)
  13. $form['autoResponder']['message'] .= "Message 2";
  14.  
  15. // return modified form
  16. return $form;
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement