Hi there,
Firstly, I've used the tectite formmail in various guises over the past month and think it's a fantastic product, so well done to you on that.
Unfortunately, a couple of problems (fyi I'm using v7.10)...
1) I now use a mail.ini to simplify the html on the front end, and have all the hidden fields in it. However, I've found that 'mail_options' field (specifically for use with 'HTMLTemplate') does not seem to work when it's in the INI file. I can only get the templates to work when the field is used in the html (ie <input name="mail_options".....).
Is this by design, or something just not working quite right?
2) I'm wanting to use php templates rather than HTML by using 'templateurl' instead of 'templatedir' (so I can do a little more processing of what info is displayed to the recipient. However, I've figured out (by process of multiple testing and ever increasing levels of printing debugging variables!) that nothing (beyond USER_AGENT) seems to be sent to the .php template (ie at the top of my script i have print_r($_GET) & print_r($_POST), and it just returns "Array ( ) Array ( [USER_AGENT] => Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.8.0.8) Gecko/20061025 Firefox/1.5.0.8 )")
Am I being stupid, or is there something wrong, because if the template is not receiving ANY data from formmail, then how's it supposed to work?
Incidentally, the HTML form is as follows:
HTML Code:
<form id="contact_form" action="/_library/formmail.php" method="post">
<input type="hidden" name="mail_options" value="HTMLTemplate=template.php,TemplateMissing= " />
<p><label class="label" for="realname">Name</label><input type="text" id="realname" name="realname" class="input" value="Tom" /></p>
<p><label class="label" for="email">Email Address</label><input type="text" id="email" name="email" class="input" value="tom@squeegee-design.co.uk" /></p>
<p><label class="label" for="telephone">Telephone</label><input type="text" id="telephone" name="telephone" class="input" value="07790" /></p>
<p><label class="label" for="enquiry">Enquiry</label><textarea id="enquiry" name="enquiry" class="input"/>test</textarea></p>
<p>How would you prefer to be contacted?
<label for="by_email"><input name="contact_by" type="radio" value="by_email" id="by_email" checked="checked" />
By Email </label>
<label for="by_telephone"><input name="contact_by" type="radio" value="by_telephone" id="by_telephone" />
By Telephone </label>
</p>
<p><input type="submit" value="Submit" class="floatright"/></p>
</form>
Mail Ini:
Code:
[email_addresses]
sqg = "#####"
tom = "#####"
simon = "#####"
user = "#####"
[special_fields]
recipients = "tom"
required = "realname"
good_url = "../contact_me.php?thankyou"
bad_url = "../contact_me.php?whoops"
this_form = "#####/contact_me.php"
subject = "##### Website Enquiry"
derive_fields = "contactmethod = email + telephone,ipaddr = REMOTE_ADDR,browser = HTTP_USER_AGENT, referrer = HTTP_REFERER"
env_report = "REMOTE_HOST,REMOTE_ADDR,REMOTE_USER,HTTP_USER_AGENT"
Any ideas on either of my problems?
Cheers, and keep up the good work!!
Bookmarks