Results 1 to 8 of 8

Thread: HTML Email does not work if not all fields are filled.

  1. #1
    Join Date
    Jul 2004
    Posts
    4

    Default HTML Email does not work if not all fields are filled.

    Hi,

    The HTML template works fine when all the fields had been filled up but it does not work if one of the fields are not filled up.

    I've tried putting the hidden field:

    <input type="hidden" name="mail_options" value="TemplateMissing=N/A" />

    and it did not solve it.

    I tried putting the hidden field:

    <input type="hidden" name="mail_options" value="NoEmpty" />

    and it did not solve it.

    How do I work around this?

    Thanks.

  2. #2
    Join Date
    Jul 2004
    Posts
    4

    Default Re: HTML Email does not work if not all fields are filled.

    That's OK.

    I found the solution for this. For those who don't know continue reading: http://www.tectite.com/vbforums/showthread.php?t=104.

    And you'll find it there.

    Thanks.

  3. #3
    Join Date
    Apr 2004
    Posts
    13

    Default Re: HTML Email does not work if not all fields are filled.

    Okay, I'm having the same problem. What's the answer please?

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

    Default Re: HTML Email does not work if not all fields are filled.

    Hi,

    The solution is to specify "NoEmpty" in your mail_options field.

    If you don't have a mail_options field, add this line into your HTML form:

    Code:
     
    <input type="hidden" name="mail_options" value="NoEmpty" />
    If you already have one, then you need to add "NoEmpty" to the value, for example:

    Code:
     
    <input type="hidden" name="mail_options"
      value="HTMLTemplate=fred.htm" />
    
    becomes:
     
    <input type="hidden" name="mail_options"
      value="HTMLTemplate=fred.htm,NoEmpty" />
    I expect that onlmega tried to create two "mail_options" fields, and that doesn't work in HTML.
    Russell Robinson - Author of Tectite FormMail and FormMailDecoder
    http://www.tectite.com/

  5. #5
    Join Date
    Apr 2004
    Posts
    13

    Default Re: HTML Email does not work if not all fields are filled.

    I actually got it to work with the mail_options "TemplateMissing=N/A". Is the only difference between the two options, that with the "NoEmpty" option returns all the empty fields with all blanks instead of the "N/A"?

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

    Exclamation Re: HTML Email does not work if not all fields are filled.

    Hi,

    My answer isn't quite right regarding NoEmpty.

    Here's the correct information:

    NoEmpty

    Only applies to a plain text email (the default that you receive from FormMail). If a field is empty and this mail_option is specified, then that field and its title will not be included in the email.

    NoEmpty has no effect in an email template.

    TemplateMissing

    Only applies to template processing. By default, if a field is missing when processing a template, FormMail will treat this as a fatal error. The form submission will fail and an alert message will be sent to you.

    If you want your template to work even when fields are missing, you must specifiy TemplateMissing in mail_options. You provide a string which FormMail will use in place of any empty fields.
    Russell Robinson - Author of Tectite FormMail and FormMailDecoder
    http://www.tectite.com/

  7. #7
    Join Date
    Apr 2004
    Posts
    13

    Default Re: HTML Email does not work if not all fields are filled.

    Thank you for clearing that up. Can the value for TemplateMissing be a blank space?

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

    Default Re: HTML Email does not work if not all fields are filled.

    Hi,

    Yes, but generally I use it like this:

    Code:
    <input ... value="HTMLTemplate=blah.htm,TemplateMissing=" />
    ...completely empty string.
    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. Sending form results in an HTML email
    By russellr in forum HOWTO Guides and Tips
    Replies: 26
    Last Post: 12-Jan-2006, 08:31 PM
  2. Can I Include an Image in an HTML Email??
    By minskin in forum FormMail Subscription Support
    Replies: 4
    Last Post: 19-Jun-2004, 02:43 PM
  3. HTML email reply
    By aussieincanada in forum FormMail Subscription Support
    Replies: 5
    Last Post: 04-Jun-2004, 06:07 AM
  4. send an email in HTML
    By michecosta in forum FormMail Subscription Support
    Replies: 3
    Last Post: 25-May-2004, 08:18 PM
  5. Deriving fields from other fields
    By russellr in forum HOWTO Guides and Tips
    Replies: 0
    Last Post: 13-May-2004, 12:25 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
  •