Hello every one,
Thanks to the Chronoengine team for such a great component.
My question is this : In my form, I use separate fields for Name and surname (one field for each). In the email sent, I'd like to have Name + surname appearing in the "From" area of the email sent, followed by the email address. It seems that I can only have one field mentioned in the "From name field:" area of form config. How can I have Name + surname appearing there? Thanks for any help.
Thanks to the Chronoengine team for such a great component.
My question is this : In my form, I use separate fields for Name and surname (one field for each). In the email sent, I'd like to have Name + surname appearing in the "From" area of the email sent, followed by the email address. It seems that I can only have one field mentioned in the "From name field:" area of form config. How can I have Name + surname appearing there? Thanks for any help.
Hi Moulouk,
Try this: in your form html add a hidden field like
Then turn debug on and check the results.
Bob
PS With some ISPs using the submitters email as the From Email Address may cause emails to fail.<br><br>Post edited by: GreyHead, at: 2008/01/03 18:18
Try this: in your form html add a hidden field like
<input type="hidden" name="fromname" value="" />
this is just to create a placeholder for the fromname. In the Special Fields tab put fromname in the 'From name field' box. Lastly, in the OnSubmit, before email field put this code<?php
$_POST['fromname'] = $_POST['firstname']." ".$_POST['lastname'];
?>
This should give the new value to the 'fromname' field.
Then turn debug on and check the results.
Bob
PS With some ISPs using the submitters email as the From Email Address may cause emails to fail.<br><br>Post edited by: GreyHead, at: 2008/01/03 18:18
It's working now. Thanks so much Bob. I really appreciate your support and help.
This topic is locked and no more replies can be posted.