Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: Advanced FormMail Templates

  1. #1
    Join Date
    Aug 2010
    Posts
    9

    Lightbulb Advanced FormMail Templates

    I only joined the forums a day or two ago to get help with updating my form - but I managed to do all the work just by reading the excellent "How-To" docs.

    So as a way of saying Thank you I want to share the results of my labors with the Community:

    This is an advanced HTML template for use with FormMail:

    Customization:

    • Country drop down box listing 230+ Countries
    • It will show input errors in a custom Error Template
    • Uses a custom Good Template
    • Sends a custom plain text e-mail to you
    • Fully intergrated with fmbadhandler.php for error reporting
    • Uses Conditions to ensure REALNAME, COUNTRY are included in the form submission and checks that EMAIL & EMAIL2 are the same.


    Use:
    Is your FormMail working first? OK proceed ONE STEP AT A TIME

    Step 1.
    Open formmail_template.htm
    Find & Replace YOUR_SITE to your own site name
    Find & Replace YOUR_FORM_NAME to your form name i.e. formmail/contact.htm
    Upload folder fmtemplates and contents to your server ABOVE THE ROOT or WWW or public_html NOT INSIDE YOUR WEBSITE DOMAIN

    Step 2.
    Backup your formmail.php
    Open backup formmail.php
    Find $TEMPLATEDIR
    Configure the path to fmtemplates i.e. $TEMPLATEDIR = "/local/home/fmtemplates/";
    HELP: http://www.tectite.com/fmdoc/templatedir.php
    SAVE - UPLOAD to your server and TEST: good submission, bad submission and resulting emails.

    Step 3.
    Open fmbadhandler.php
    Find $TARGET_URLS = array();
    Configure your acceptable domains i.e. $TARGET_URLS = array("http://www.YOUR_SITE.com/contact.htm");
    Find $TEMPLATEDIR
    Configure your template directory i.e. $TEMPLATEDIR = "/local/home/fmtemplates/";
    SAVE - UPLOAD to your server and TEST: good submission, bad submission and resulting emails.

    Credits:
    To the designer of Formmail Russell Robinson for great scripts plus HELP and HOW TO's that made it possible for an old guy to get this all working.

    Files included in Advanced_FormMail_Templates.zip:
    formmail_template.htm
    Readme.txt
    ISO-8859-1__fmbadhandler.zip (untouched download from this site)
    Dir: fmtemplates
    bad_template.htm
    good_template.htm
    plain.txt
    Total size: 22,7Kb

    Have fun
    Comments would be welcome
    Attached Files Attached Files

  2. #2
    Join Date
    Aug 2010
    Posts
    9

    Default Re: Advanced FormMail Templates

    Error email example:
    To: service@MY_SITE.com
    From: Formmail@MY_SITE.com

    The following error occurred in FormMail :
    failed_conditions
    Error=Some of the values you provided are not valid.
    The email addresses you entered don't match.
    email: test@testing.orgie
    realname: TESTING
    email2: ' test@testing.org'
    country: 'U.K.'
    inquiry: 'car'
    comments: 'bummer'
    ipaddr: '99.99.199.99'
    Referring page was http://www.MY_SITE.com/contact.htm
    SERVER_NAME was MY_SITE.com
    REQUEST_URI was /formmail/formmail.php

    User IP address was 99.99.199.99
    User agent was Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.8) Gecko/20100722 Firefox/3.6.8 GTB7.1 (.NET CLR 3.5.30729)
    Good email example:
    Contact from the Web
    E-mail: test@testing.com
    Verify e-mail: test@testing.com
    Name: TESTING
    Country: Greece
    Inquiry: helicopter
    Message: Kewel

    IP of sender: 99.99.199.99
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	good_result.jpg 
Views:	368 
Size:	5.5 KB 
ID:	301  
    Last edited by Plaka; 12-Aug-2010 at 09:33 PM. Reason: Added good submission Screenshot

  3. #3
    Join Date
    Aug 2010
    Posts
    9

    Cool Re: Advanced FormMail Templates 2

    Added an Option input field that will become the Subject: in the email you will receive.

    This is an advanced HTML template for use with FormMail from www.tectite.com.
    Designed by www.greecetailormade.com

    Customization:

    • Country drop down box listing 230+ Countries
    • It will show input errors in a custom Error Template
    • Uses a custom Good Template
    • Sends a custom plain text e-mail to you
    • Fully integrated with fmbadhandler.php for error reporting
    • Uses Conditions to ensure REALNAME, COUNTRY are included in the
    • form submission and checks that EMAIL & EMAIL2 are the same.
    • The Subject in the email you receive will depend on an option selected in your Form


    Use:
    Is your FormMail working first? OK proceed ONE STEP AT A TIME

    Step 1.
    Open formmail_template.htm
    Find & Replace YOUR_SITE to your own site name
    Find & Replace YOUR_FORM_NAME to your form name i.e. formmail/contact.htm
    Find & Replace OPTION 1, OPTION 2, OPTION 3 to whatever you want
    Find & Replace THIS IS OPTION 1, THIS IS OPTION 2, THIS IS OPTION 3 to whatever you want this value will become the SUBJECT of the email you receive
    Upload folder fmtemplates and contents to your server ABOVE THE ROOT or WWW or public_html NOT INSIDE YOUR WEBSITE DOMAIN

    Step 2.
    Open formmail.php
    Find $TEMPLATEDIR
    Configure the path to fmtemplates i.e. $TEMPLATEDIR = "/local/home/fmtemplates/";
    HELP: http://www.tectite.com/fmdoc/templatedir.php
    SAVE - UPLOAD to your server and TEST: good submission, bad submission and resulting emails.

    Step 3.
    Open fmbadhandler.php
    Find $TARGET_URLS = array();
    Configure your acceptable domains i.e. $TARGET_URLS = array("http://www.YOUR_SITE.com/contact.htm");
    Find $TEMPLATEDIR
    Configure your template directory i.e. $TEMPLATEDIR = "/local/home/fmtemplates/";
    SAVE - UPLOAD to your server and TEST: good submission, bad submission and resulting emails.

    Credits:
    To the designer of Formmail Russell Robinson for great scripts plus HELP and HOW TO's that made it possible for an old guy to get this all working.

    Files included in Advanced_FormMail_Templates2.zip:
    formmail_template.htm
    Readme.txt
    ISO-8859-1__fmbadhandler.zip (untouched download from this site)
    Dir: fmtemplates
    bad_template.htm
    good_template.htm
    plain.txt
    Total size: 22,9Kb
    Attached Files Attached Files
    Last edited by Plaka; 15-Aug-2010 at 06:27 PM.

  4. #4
    Join Date
    Aug 2010
    Location
    Cumberland MD
    Posts
    1

    Default Re: Advanced FormMail Templates

    Great post and well written, it is just what I was looking for. Thanks

  5. #5
    Join Date
    Aug 2010
    Posts
    9

    Default Re: Advanced FormMail Templates

    Thanks glad it helped you

  6. #6
    Join Date
    Nov 2008
    Posts
    12

    Default Re: Advanced FormMail Templates

    Greetings. I am in awe at your work and extremely grateful.
    It seems to answer many of my prayers.
    However I would like to ask a very silly/simple question....
    Where does the formmail_template.htm go please?

    I have installed the files using the original file names in the following trees:-

    /formmail
    -contact.htm
    -fmbadhandler.php
    -testurlopen.php
    -readme.txt
    /fmtemplates
    -badtemplates.htm
    -goodtemplates.htm
    -plain.txt
    -formmail_template.htm

    In my form I have the following that I was using fine before I saw your append:-
    <form method="post" action="http://www.my_web_site.com/formmail/formmail.php" name="sampleform" enctype="multipart/form-data">
    <input type="hidden" name="good_template" value="good.htm" />

    The success message that I receive is my original good.htm.

    Perhaps the documentation should say to remove:-
    <input type="hidden" name="good_template" value="good.htm" />
    I have worked on this all day and tis now 9.325pm..but tomorrow is another day.

    Thank you so much for your efforts and kindness in supplying your excellent scripts.

    Cheers Philip ...and I REALLY am very old

  7. #7
    Join Date
    Aug 2010
    Posts
    9

    Default Re: Advanced FormMail Templates

    Hello Phillip,
    I am also an old guy

    formmail_template.htm contains the Form data you insert into your contact.htm page - everything between <form> and </form> is needed, copy that and put it into your contact page

    <input type="hidden" name="good_template" value="good.htm" /> Yes you do need to remove that I didn't specify that in the documentation maybe I should have.

    It is replaced with the following which is already included in formmail_template.htm
    <input type="hidden" name="good_template" value="good_template.html" />


    If you need any more help I'll answer ASAP
    BTW the script is NOT my work ONLY these templates are my design.
    Stephen.
    Last edited by Plaka; 18-Aug-2010 at 03:05 PM.

  8. #8
    Join Date
    Nov 2008
    Posts
    12

    Default Re: Advanced FormMail Templates

    Indeed thank you Stephen again. I have your demo working but had to make a couple of slight changes from the documentation..
    in $TEMPLATEDIR="/local/home/fmtemplates/";
    should be $TEMPLATEDIR="/local/home/fmtemplates";
    and the good and bad templates should end in .html not htm.
    Plus /formmail/$return_link did not work.

    It is well done and thank you oh and I found that verifying the emails sometimes worked and sometimes not.
    That was the reason I was so keen to try ..I could not get email verification to work at all.
    Liked very much some of the features.
    Philip

  9. #9
    Join Date
    Aug 2010
    Posts
    9

    Default Re: Advanced FormMail Templates

    Phillip,
    Thanks for your comments ... I have the templates working perfectly on 6 websites including e-mail verification. If you need a little assistance post your template / contact form here with any sensitive info XXX'd out etc. I'll try and spot the problem.
    Stephen.

  10. #10
    Join Date
    Nov 2008
    Posts
    12

    Default Re: Advanced FormMail Templates

    Stephen I am indebted to you.
    Your form is actually working.
    However sometimes I get an error message saying email1 and email2 do not match and they are entered identically.
    Plus when I purposely leave A field blank and do the link back from the error message I get an error. This seemed to be mainly from the user name entry field.
    The form provided me with ideas that I thought were great.
    However I have opened an append today for my main problem located at Philip uploaded files adding date to... (feature not used in your form)
    The second most important problem is that I could not get my email1 and email2 verification to work in my forms and asap I will try and re-implement the email feature using your form code as a template.
    Also liked your implementation in providing the users name in the returned template. Clever and quality. Congratulations.
    Thanking you yet again
    Philip
    Last edited by Philip; 19-Aug-2010 at 10:39 PM. Reason: My error

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Advanced Error Handling
    By russellr in forum HOWTO Guides and Tips
    Replies: 12
    Last Post: 26-Oct-2005, 10:38 PM
  2. can't get good or bad templates to work...
    By skmember in forum FormMail Subscription Support
    Replies: 2
    Last Post: 04-Sep-2005, 10:14 PM
  3. Advanced Error Handling - failed to open stream: Connection timed out
    By Antonimo in forum FormMail Subscription Support
    Replies: 5
    Last Post: 31-Aug-2005, 06:52 AM
  4. php includes not showing up in good/bad templates
    By snodart in forum FormMail Subscription Support
    Replies: 2
    Last Post: 02-Apr-2005, 09:12 AM
  5. New Server - Templates sent as plain text
    By Anubis in forum FormMail Subscription Support
    Replies: 10
    Last Post: 19-Jan-2005, 10:30 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •