Skip Navigation

[Cerrado] Reply to on form submit

This support ticket is created hace 3 años, 1 mes. 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.

Hoy no hay técnicos de soporte disponibles en el foro Juego de herramientas. Siéntase libre de enviar sus tiques y les daremos trámite tan pronto como estemos disponibles en línea. Gracias por su comprensión.

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)

Este tema contiene 3 respuestas, tiene 2 mensajes.

Última actualización por Shane hace 3 años, 1 mes.

Asistido por: Shane.

Autor
Mensajes
#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

Idiomas: Inglés (English )

Zona horaria: 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

Idiomas: Inglés (English )

Zona horaria: 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

El debate ‘[Cerrado] Reply to on form submit’ está cerrado y no admite más respuestas.