Skip Navigation

[Closed] Reply to on form submit

This support ticket is created 3 years, 1 month ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 3 replies, has 2 voices.

Last updated by Shane 3 years, 1 month ago.

Assisted by: Shane.

Author
Posts
#2190135

Hello,

I was trying to get "reply-to" to work according to this post:
https://toolset.com/forums/topic/form-reply-to-address/

I put the below in my functions.php which is in the directory of my child theme (I have many custom functions there that work fine)
But with the below I get a white screen after refresh - so clearly something is wrong in the code - and I missing something?
Thanks!!

function customise_cred_notifications( $headers, $formid, $postid, $notification_name, $notification_number ) {
if ($formid==13082 && $notification_name=='Terms Agreement'){
$myheaders = array();
$email = get_post_meta('wpcf-email-terms', $postid);
$myheaders = array( 'Reply-To: '.$email);
return array_merge($headers, $myheaders);
}
return $headers
}
add_filter('cred_mail_header', 'customise_cred_notifications', 10, 5);

#2190811

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Scott,

Thank you for getting in touch.

The problem is the missing semi-colon where it says return $headers.

Once you add this it should now work.

Thanks,
Shane

#2190833

Thank you Shane,

So...it doesn't break the site now, so that's good. However, it's not working. I tested and when I hit reply it just replies to the email in the "email" field under "Notification e-mail sender information"
Here's my form - am I doing something wrong?
[credform]
[cred_field field='form_messages' class='alert alert-warning']
<div class="row">
<div class="col-sm-6"><div class="form-group">
<label for="%%FORM_ID%%_full-name">[cred_i18n name='full-name-label']Full Name[/cred_i18n]</label>
[cred_field field='full-name' force_type='field' class='form-control' output='bootstrap']

</div></div>
<div class="col-sm-6"><div class="form-group">
<label for="%%FORM_ID%%_email-terms">[cred_i18n name='email-terms-label']Email[/cred_i18n]</label>
[cred_field field='email-terms' force_type='field' class='form-control' output='bootstrap']
</div></div>
</div>

<div class="form-group">

[cred_field field='i-agree-to-terms' force_type='field' class='' output='bootstrap']
</div>
[cred_field field='recaptcha' class='form-control' output='bootstrap']
[cred_field field='form_submit' output='bootstrap' value='Submit' class='btn btn-primary btn-lg']
[/credform]

#2191039

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Scott,

This should be working based on the information in your form.

Would you mind allowing me to have admin access to the site so that I can look at this in a bit more detail for you ?

I've enabled the private fields for you next response.

Please let me know the page that the form is on.

Thanks,
Shane

The topic ‘[Closed] Reply to on form submit’ is closed to new replies.