Hi, bt-chadski,
Yes, this is doable. You would need to use one of Gravity Forms' hooks to modify the notification message being sent. If you were simply conditionally sending to a different email address based on the selection, it could be done in the admin. But, since you are modifying the content of the email, you would use the "gform_pre_submission_filter" (http://www.gravityhelp.com/documentation/page/Gform_pre_submission_filter). You would add some code to check the drop down and build your message with the link based on the selection. Below is a quick example of modifying the message:
add_action("gform_pre_submission_filter", "change_autoresponder");
function change_autoresponder($form){
$new_message = "This is a test changing the autoresponder in the pre submission filter";
foreach($form["fields"] as &$field)
{
//do this for a specific field
if ($field["id"] == 5)
{
$input_name = "input_" . $field["id"]; //get name of form field
$fieldname = $field["label"]; //get field label
$value = $_POST[$input_name]; //get value of field out of the post data
if (!empty($value))
{
//there is a value, add field to user autoresponder message - "\r\n" is a carriage return line feed
$new_message .= "\r\n" . $fieldname . " - " . $value;
}
}
}
//change autoresponder in form to new one
$form["autoResponder"]["message"] = $new_message;
//return form so changes are applied
return $form;
}
So, there are a lot of existing examples out there which can make things like this very easy to do. We can help guide you in the right direction if you have problems.
Take a look and let me know if you have questions.
Posted 12 years ago on Monday March 12, 2012 |
Permalink