Buy Now
Sign in

Custom subject line

shank , December 06 2007, 22:25
S
shank 14
December 06 2007, 22:25 #4367
Hello all

I'm trying to customize my EMAIL subject with some of the input fields from the form. I am not placing the data in a DB, but just taking the form and having it emailed. I was able to have the email content have the form content, but now I need the email subject to have a field (users name) in the subject.

thanks!
GreyHead 64
December 07 2007, 00:55 #4372
Hi shank,

Put the field name in the 'Subject field' box on the 'Special Fields' tab.

Bob
ChronoForms technical support
If you'd like to buy me a coffee or two, thank you very much
S
shank 14
December 07 2007, 02:02 #4382
Hello again

The one field works, sweet.

but the question is how do I so for example


subject line: Hello firstname_field lastname_field how are you?

basically multiple fields and a statement
GreyHead 64
December 07 2007, 02:42 #4386
Hi shank,

It needs a little code snippet in the 'OnSubmit before email' box:
<?php
$rows[0]->emailsubject = "Hello ".$_POST['firstname_field']." "$_POST['laststname_field']," how are you?";
?>
Bob
ChronoForms technical support
If you'd like to buy me a coffee or two, thank you very much
S
shank 14
December 07 2007, 02:55 #4389
do i need special fields too? or just this code snippet?

regards..
S
shank 14
December 07 2007, 03:13 #4390
i put the code in exactly how you had it, but i still get the subject TEST which i put in the general tab...
GreyHead 64
December 07 2007, 04:12 #4391
Hi shank,

I'm having a bad hair day - there's a typo in there too. Try this version:
<?php
$rows[0]->emailsubject = "Hello ".$_POST['firstname_field']." "$_POST['laststname_field']." how are you?";
?>
Bob
ChronoForms technical support
If you'd like to buy me a coffee or two, thank you very much
S
shank 14
December 07 2007, 23:46 #4412
i tried that put TEST comes as the subject line, which is in the general tab.
GreyHead 64
December 08 2007, 13:37 #4418
Hi shank,

*** **** ***** *** !! * another typo . . .
 <?php
$rows[0]->emailsubject = "Hello ".$_POST['firstname_field']." ".$_POST['laststname_field']." how are you?";
?>
Bob
ChronoForms technical support
If you'd like to buy me a coffee or two, thank you very much