The user notification area supports conditional shortcodes:
http://www.gravityhelp.com/documentation/page/Shortcodes#Conditional_Shortcode
So you can use conditional logic there if you need to do something other than {all_fields} and have more complex requirements.
If that does not work for you, you can completely change the user notification using the gform_pre_submission_filter. Here is an example of how to use it:
[php]
<?php
// change 19 to your form ID
add_filter('gform_pre_submission_filter_19', 'conditional_message');
function conditional_message($form){
// update the "3" following "input_" to the ID of your field
$value1 = rgpost('input_3');
// I append my conditional text to the autoResponder (user notification) which is already set up in the form builder
switch($interest) {
case 'beltguard':
$form['autoResponder']['message'] .= "Interest: Belt Guards</p>";
break;
case 'safetyguard':
$form['autoResponder']['message'] .= "Interest: Safety Guards</p>";
break;
case 'catalogue':
$form['autoResponder']['message'] .= "Interest: Catalogue</p>";
break;
}
// return modified form
return $form;
}
Documentation: http://www.gravityhelp.com/documentation/page/Gform_pre_submission_filter
Posted 12 years ago on Monday October 8, 2012 |
Permalink