Page 1 of 3 123 LastLast
Results 1 to 10 of 21

Thread: Templatedir Help!

  1. #1
    Join Date
    Apr 2007
    Posts
    28

    Default Templatedir Help!

    It's frustration time. I've read the instructions, I checked 6 times, I've read the forums. Still does not work.
    I'm using version 8.11
    In my form:
    <input type="hidden" name="mail_options" value="PlainTemplate=faculty.txt" />

    The name of my template directory is temdir
    The document path identified by the alert test is (I've substituted the real name with "username" for this post)
    /home/username/www/www

    So, in the script:

    $TEMPLATEDIR = "/home/username/www/www/temdir";

    I get the form results but not using the template.

    I tried this:
    $TEMPLATEDIR = "http://domainname.org/temdir";

    still no template.
    the template has entries like:

    Name: $realname
    Phone: $phone

    and they all correspond to actual fields.
    What am I missing?!

  2. #2
    Join Date
    Jan 2009
    Posts
    6

    Default Re: Templatedir Help!

    Hi

    I had the same problem. Got it to work by using TEMPLATEURL instead.

    When I have time, I'm going to try to set up the Advanced Error Checking thing to try to figure out what's going on.

    Allison

  3. #3
    Join Date
    Apr 2007
    Posts
    28

    Default Re: Templatedir Help!

    Okay, but I want more than one template to use with multiple forms - so using templateurl wouldn't work, right?

  4. #4
    Join Date
    Mar 2004
    Posts
    2,224

    Default Re: Templatedir Help!

    but I want more than one template to use with multiple forms - so using templateurl wouldn't work, right?
    TEMPLATEURL and TEMPLATEDIR only set the folder (directory) not the actual template

    ur PlainTemplate value gets appended, so thats how different forms can use different templates

    do u have DEF_ALERT set and have u tested alerts? if so, and theres an error, formmail will tell u about the error. if not, do that first.

    if ur not getting an alert message with an error then u probly havent put mail_options field between the <form> and </form> tags

    wots the URL for ur form? i'll take a look

  5. #5
    Join Date
    Apr 2007
    Posts
    28

    Default Re: Templatedir Help!

    I tried using TEMPLATEURL and TEMPLATEDIR and neither works.
    I'm not putting the filename there, I'm only naming the folder where the templates are. I've used earlier versions of tectite on 3 other sites and they're all working.
    I set DEF_ALERT and mail_options IS within the form tags.
    If you want to check the form: http://www.berrymaninstitute.org/res...affiliate.html
    The form is working - I get the default form results. But I'd really like to use the plain templates.
    I used the document root info from the alert test and added the directory name (no slash after). I've tried the full url, too.
    I've checked and checked and checked to make sure the filenames were right, no stray spaces, etc.
    The only thing I haven't tried is using an older version.

  6. #6
    Join Date
    Mar 2004
    Posts
    2,224

    Default Re: Templatedir Help!

    ur form looks fine

    have u run the HTML thru the validator at w3.org?

    i did a testalert test for u - did u get the email?

    hey - i bet ur getting an alert message and u think they are form results because errors contain a copy of the form submission

    when u submit ur form, what does the subject of the email say. wot does the first few lines say?

  7. #7
    Join Date
    Apr 2007
    Posts
    28

    Default Re: Templatedir Help!

    I got the testalert email you sent.
    I'm getting two emails when I test: the default email that corresponds to the form fields and an error message telling me what fields were not filled in:
    email:
    realname: RM Smith
    others:
    street:
    city: AND the error email that tells me this

    The following error occurred in FormMail :
    Template "faculty.txt" caused the following errors :

    "others" is not a field submitted from the form
    "street" is not a field submitted from the form .......

    email:
    realname: RM Smith
    others: ''
    street: ''
    city: ''

    So, I guess now it's finding the template, but it's not using the template.
    My template has this:

    Name: $realname
    Other individuals and primary responsibility: $others
    Mailing Address: $street, $city
    E-mail: $email
    Phone: $phone
    Fax: $fax

  8. #8
    Join Date
    Mar 2004
    Posts
    2,224

    Default Re: Templatedir Help!

    The following error occurred in FormMail :
    Template "faculty.txt" caused the following errors :

    "others" is not a field submitted from the form
    "street" is not a field submitted from the form .......

    yep, thats why the template aint working

    u need to add "TemplateMissing=" to ur mail_options

  9. #9
    Join Date
    Apr 2007
    Posts
    28

    Default Re: Templatedir Help!

    Well, I rewrote the plain template file and now it's working.
    It would be nice to know what I did wrong. But, it's working, anyway.
    Thank you crabtree, you did help.

  10. #10
    Join Date
    Apr 2007
    Posts
    28

    Default Re: Templatedir Help!

    Would the absence of "TemplateMissing=" from mail_options cause the template to be ignored?

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Defining your TEMPLATEDIR path with Godaddy (Linux)
    By JacobF in forum HOWTO Guides and Tips
    Replies: 0
    Last Post: 02-May-2008, 02:19 AM
  2. No email delivery after $TEMPLATEDIR config
    By gofreeserve in forum Community Support
    Replies: 1
    Last Post: 08-Jan-2008, 07:02 AM
  3. Templatedir
    By cesar in forum FormMail Subscription Support
    Replies: 2
    Last Post: 14-Jun-2006, 10:32 PM
  4. error using $templatedir
    By smartie91 in forum Community Support
    Replies: 13
    Last Post: 11-Apr-2006, 03:49 PM

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
  •