Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // customize user notification message
- add_filter('gform_pre_submission_filter_1', 'conditional_message');
- function conditional_message($form){
- // define conditional on payment options field
- $choice1 = RGForms::post('input_50_1');
- $choice2 = RGForms::post('input_50_2');
- // if any box was checked, display a message. Since field is required, this will always test TRUE
- if($choice1 || $choice2)
- $form['autoResponder']['message'] .= "Hello, Message.";
- // append a different PDF link based on the interest
- if($choice1)
- $form['autoResponder']['message'] .= "<p>Here are the payment details...</p>";
- if($choice2)
- $form['autoResponder']['message'] .= "<p>Here are the payment details...</p>";
- // return modified form
- return $form;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement