PDA

View Full Version : Email Template + Good URL Template?



nolene
30-Nov-2008, 06:55 AM
I have a single form. When the form is filled out, I would like an email sent to me with the form information using a plain text form, plus upon hitting the submit button, have the user redirected to another web page confirming that they have submitted the form and have the web page include data from the form fields so they can print it out as a confirmation.

Is it not possible to do this or is this possible to do and I just have it set up wrong or I have to do something totally different.

The emailed form works fine, and the redirect works except that it doesn't show the field data.

These are in my .php:

$TEMPLATEURL = "http://mysite.org/meetings/"; // this is the directory on my site where the html redirect page is. It doesn't work with or without the subdirectory 'meetings/'
$TEMPLATEDIR = "/hsphere/local/home/mysite/fmtemplates/" // this is the directory where my plain template for the email is

These fields are in my form:
<input type="hidden" name="good_url" value="meetings/paymentCart-frm.html"> // If I take 'meetings/' out, then I get a 404 when I hit submit.
<input type="hidden" name="good_template" value="registration.txt"> // this works fine
<input type="hidden" name="mail_options" value="PlainTemplate=registration.txt,TemplateMissing=" > // this works fine

This (among other html code) is on the redirect page which is paymentCart-frm.html

<table border="0">
<tr>
<td>Meeting Date:</td>
<td colspan="3">$Date</td>
</tr>
<tr>
<td>Name:</td>
<td>$realname</td>
<td>Member?</td>
<td>$Member</td>
</tr>
<tr>
<td>Company:</td>
<td colspan="3">$Company</td>
</tr>
<tr>
<td>Email:</td>
<td colspan="3">$email</td>
</tr>
<tr>
<td>No. of Meals:</td>
<td colspan="3">$MealQty</td>
</tr>
<tr>
<td>Names of Guests:</td>
<td colspan="3">$Guest1, $Guest2, $Guest3, $Guest4, $Guest5</td>
</tr>
</table>

nolene
30-Nov-2008, 07:38 AM
I got it ....

Just had to put my redirect page into my form template directory and change

<input type="hidden" name="good_template" value="registration.txt"> // this works fine

(which I guess was not really working as it was actually redundant and not affecting the email sent at all) to

<input type="hidden" name="good_template" value="paymentCart-frm.html">