Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- // http://www.gravityhelp.com/forums/topic/user-notification-email-upon-successful-quiz#post-172441
- add_action('gform_pre_submission_filter_289', 'quiz_certificate');
- function quiz_certificate($form) {
- // you will have to set $passed to true or false here based on whatever criteria you use for grading
- // lots
- // of
- // code
- // here
- if ( $passed == true ) {
- // this will send the autoresponder which is already set up
- return $form;
- }
- else {
- // clear out any autoresponder values
- $form['autoResponder'] = array(
- 'toField' => '',
- 'bcc' => '',
- 'fromName' => '',
- 'from' => '',
- 'replyTo' => '',
- 'subject' => '',
- 'message' => '',
- 'disableAutoformat' => '');
- return $form;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement