Forums

how to send email as submitter?

sspeed 09 Oct, 2007
I finally got the email functionality working with a chronocontact.php change I found in another thread.

My question is this, I'm having the user submit their email addres and capturing it in a variable called "email" in the form.

Can I put the variable somehow in to the "From email" field so the email that comes to me shows as the person who submitted? If so, how do I do this? I tried just putting "email" in to that field, but that doesn't work.
Max_admin 09 Oct, 2007
Hi sspeed,

you can achieve this by adding it at the Special fields tab > From email field!!🙂

Cheers

Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
sspeed 09 Oct, 2007
Awesome, so do I put the name of the variable from the html form in the special field place then?

What do I put for From Email and From name in the regular tab then?
GreyHead 10 Oct, 2007
Hi sspeed,

The answer should be 'nothing' but I think there may be a bug in the current version that requires you to put an email adddress in there - in which case use something like [email]user@example.com[/email].

If that doesn't work ask here again and I'll look at the code.

Bob<br><br>Post edited by: GreyHead, at: 2007/10/10 11:01
sspeed 10 Oct, 2007
Brilliant, that worked, thank you! I have one more question, but I'll start a new thread for it.
riga75 13 Jan, 2008

Hi sspeed,

you can achieve this by adding it at the Special fields tab > From email field!!🙂

Cheers

Max



I have done what you say but when I come from the email form I see that in the field to have the email but if I reply leaves me out of the email that was sent in the form.
What's wrong?


Stefano
GreyHead 14 Jan, 2008
Hi Stefano,

I'm sorry, I don't understand your question. Please can you give me an example of what you put in the boxes and what the result is.

Thanks
Bob
ulsen 07 Feb, 2008
hi,

don't know if this is too off-topic, but can you actually put two input names in one "special field"?

like say, i have one input field for first name and one for last name. can i now put something like"firstname,lastname" in the "from"-field? or only either first name or last name? :dry:

thx!!
Max_admin 09 Feb, 2008
no only one, however a trick to pass over this is adding this code to the on submit before email box :


$_POST[$paramsvalues->fromnamefield] = $_POST['firstname_field']." ".$_POST['lastname_field'];


Cheers,

Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
ulsen 11 Feb, 2008
Thank you so much Max, this is just a big box of awesome!!

However, for future people wanting to use this, i just wanted to add that (for me) the code works like this (as the field description says, you gotta add the php begin and end tags):

<?php

$_POST[$paramsvalues->fromnamefield] = $_POST['firstname_field']." ".$_POST['lastname_field'];

?>


And then you need to post the following into "From name field:"

firstname_field,lastname_field


Everybody have a nice week,

Uli
GreyHead 12 Feb, 2008
Hi Uli,

You certainly need the <?php ?> tags, I think Max took them for granted.

Not sure if you need to post the fieldnames in the FromName field though, I think Max's hack should work without this.

Bob
This topic is locked and no more replies can be posted.