Results 1 to 6 of 6

Thread: Problem with Form Field

  1. #1
    Join Date
    Jun 2004
    Posts
    3

    Unhappy Problem with Form Field

    Hi,

    First of all, thanks for such a great script. I am having trouble however with a checkbox field on my form. It's not in the required statement but when you submit the form without checking the box, it send the user to the bad url and asks them to fill out all required fields (when they all are filled out). There are only 3 requirements: Name, e-mail address, and a message. The checkbox should be optional and again, is not a required field. I am using an HTML template, but I wouldn't think that it would cause a problem. Can anyone help?

    My form is here... (please feel free to test it out):

    http://<url deleted>/contact.php

    Thanks,
    Joe
    Last edited by russellr; 14-Jun-2004 at 08:11 PM.

  2. #2
    Join Date
    Dec 2003
    Posts
    3,980

    Lightbulb Re: Problem with Form Field

    Hi Joe,

    I don't think the problem is with required fields.

    When I get redirected to the bad_url, I can see this:
    Code:
     
    ...<site>/oops.php?this_form=&bad_template=&error=Failed+to+send+email&extra=&....
    The error message is actually "Failed to send email".

    You should get an alert email message too, but I guess you're not getting that.

    Use the test script and info on this post: http://www.tectite.com/vbforums/showthread.php?t=62

    to get your server sending email. Once that's working, you can make progress on your form.
    Last edited by russellr; 14-Jun-2004 at 08:12 PM.
    Russell Robinson - Author of Tectite FormMail and FormMailDecoder
    http://www.tectite.com/

  3. #3
    Join Date
    Jun 2004
    Posts
    3

    Default Re: Problem with Form Field

    I got 'mail function succeeded', when using the testmail.php file so it might not be that. I have been getting the errors and here's what they say:


    The following error occurred in FormMail:
    HTMLTemplate
    '<path-to>/html/email/formtemplate/index.php'
    caused the following errors:
    'loginrequest' is not a field submitted from the form

    message: 'This is a test.'


    ===
    And
    ===

    The following error occurred in FormMail:
    mail_failed
    **********
    Error=Failed to send email


    message: 'This is a test.'
    ----------------------------------------------------

    What do you make of it. Is the problem in the source code for the form?
    Last edited by russellr; 14-Jun-2004 at 08:12 PM.

  4. #4
    Join Date
    Dec 2003
    Posts
    3,980

    Default Re: Problem with Form Field

    Hi,

    I got 'mail function succeeded', when using the testmail.php file so it might not be that
    That's good. Did you also get the email that it sends?


    The following error occurred in FormMail:
    HTMLTemplate
    '<path-to>/html/email/formtemplate/index.php'
    caused the following errors:
    'loginrequest' is not a field submitted from the form
    This indicates a problem with filling in the template. I've just checked the logic in Formmail, and I suggest this modification to your form (add a definition for "TemplateMissing"):

    Code:
    <input type="hidden" name="mail_options"
    value="HTMLTemplate=index.php,NoEmpty,TemplateMissing=" />
    I think this will stop the above error when the checkbox hasn't been checked.

    If you're still getting errors after that, could you send me:
    • your configured formmail.php
    • your template (index.php)
    • your good_url script (success.php)
    • your bad_url script (oops.php)
    Please send to supportstaff AT tectite DOT com.
    Last edited by russellr; 14-Jun-2004 at 08:13 PM.
    Russell Robinson - Author of Tectite FormMail and FormMailDecoder
    http://www.tectite.com/

  5. #5
    Join Date
    Jun 2004
    Posts
    3

    Default Re: Problem with Form Field

    Great! The TemplateMissing thing did the trick. Everything works perfectly now. What does TemplateMissing do in formail so I know for the future forms?

    Also, I have my html template made and the e-mail gets sent to a hotmail account and looks good there (minus my stylesheet, but I guess Hotmail overrides that). Anyway, I tried to send the form results to a pop account through Outlook and none of the graphics aren't showing up. I'm able to receive html e-mails in my settings and have sent and received many in the past. Any idea on why that might be happening?

    Thanks again for the solution,
    Joe

  6. #6
    Join Date
    Dec 2003
    Posts
    3,980

    Default Re: Problem with Form Field

    Hi,

    What does TemplateMissing do in formail so I know for the future forms?
    When your template refers to a field, FormMail insists on find a value for that field or sending an alert to you that says it's missing. The TemplateMissing setting tells FormMail to use that string instead of complaining.

    You could, for example, do this:
    Code:
     TemplateMissing=n/a
    and you'll get "n/a" for every missing field.

    Anyway, I tried to send the form results to a pop account through Outlook and none of the graphics aren't showing up. I'm able to receive html e-mails in my settings and have sent and received many in the past. Any idea on why that might be happening?
    No idea. If you have a look at the source of the email, do the graphics references make sense? Are they full URLs, for example?
    Russell Robinson - Author of Tectite FormMail and FormMailDecoder
    http://www.tectite.com/

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. form field realname ?
    By milez in forum FormMail Subscription Support
    Replies: 4
    Last Post: 16-Nov-2005, 03:59 PM
  2. Can "Reply To" EM Field be set to email field
    By CWD in forum FormMail Subscription Support
    Replies: 2
    Last Post: 26-Jul-2005, 04:56 AM
  3. Is the recipients field required in html form?
    By adam2003w in forum FormMail Subscription Support
    Replies: 1
    Last Post: 15-Jun-2005, 02:54 AM
  4. Form from address as Field Value email
    By Chek in forum FormMail Subscription Support
    Replies: 3
    Last Post: 12-Apr-2005, 09:07 PM
  5. Including entered form field in email subject?
    By camelot in forum FormMail Subscription Support
    Replies: 1
    Last Post: 23-Mar-2005, 07:52 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
  •