Results 1 to 6 of 6

Thread: Field dependent HTML confirmation mail

  1. #1
    Join Date
    Jan 2007
    Posts
    9

    Red face Field dependent HTML confirmation mail

    Trying to set up a language-dependent HTML confirmation mail and a good_template="Confirmation.html". The language is choosen by the user via a radio button $Language.

    I've tryed to use <input type="hidden" name="mail_options" value="HTMLTemplate = Confirmation.htm" /> and to modify the value but I keep getting errors as the value cannot be neither a derived field, nor a variable.

    Can anyone give me a hint ?

  2. #2
    Join Date
    Feb 2008
    Posts
    149

    Default Re: Field dependent HTML confirmation mail

    How many choices do you need?

    I replied earlier, but I think I misunderstood what you are trying to do.

    Can you give us a URL to your form and tell us a little more about what you want?
    Last edited by Jamesiv1; 01-May-2008 at 03:44 AM.
    James Ivey
    Interested in calligraphy?
    www.iampeth.com

  3. #3
    Join Date
    Jan 2007
    Posts
    9

    Default Re: Field dependent HTML confirmation mail

    I didn't see your earlier reply, but anyway: I'm trying to send an HTML confirmation mail in the language choosen by the visitor.

    For the time being, this mail is sent to myself for testing purposes, but later it will be set up as an autoresponse mail.

    In order to do that, I used the procedure as described in http://www.tectite.com/vbforums/showthread.php?t=104 "Sending form results in an HTML email" with <input type="hidden" name="mail_options" value="HTMLTemplate = Confirmation_mail.htm" />. It even works fine !

    Now, what I'm trying to do is to modify the HTMLTermplate value on the fly according to the contents of a field "Language" in the form which can be "F" or "D" (French/Deutsch). The value should become "HTMLTemplate = Confirmation_mail_F.htm" or "HTMLTemplate = Confirmation_mail_D.htm". The "derived_fields" function cannot be used, as the value is not part of the form.

  4. #4
    Join Date
    Feb 2008
    Posts
    149

    Default Re: Field dependent HTML confirmation mail

    aahh.. ok. As long as you only need two options, then this method will work.

    Set up your form as a multiform http://www.tectite.com/fmhowto/multiforms.php

    On the 1st page of the form, have them choose French or Dutch using checkboxes.

    Then, use derived fields to define which 2nd page they see (the "next_form" field) - either french.htm or dutch.htm.

    Code:
    <input type="hidden" name="derive_fields" value="next_form=%if(French;french_confirm;dutch_confirm)%">
    <input type="hidden" name="french_confirm" value="french.htm">
    <input type="hidden" name="dutch_confirm" value="dutch.htm">
    The 2nd page is where you will define which template they get.

    And for the checkboxes:
    Code:
    <input type="checkbox" name="French" value="whatever">Do you speak French?
    <input type="checkbox" name="Dutch" value="whatever">Do you speak Dutch?
    Last edited by Jamesiv1; 01-May-2008 at 09:40 PM.
    James Ivey
    Interested in calligraphy?
    www.iampeth.com

  5. #5
    Join Date
    Feb 2008
    Posts
    149

    Default Re: Field dependent HTML confirmation mail

    Thanks to a post by Russell, here is a much simpler way to do this, using multiforms and radio buttons. This way you can have as many options as you want:

    Code:
    <input type="radio" name="next_form" value="french.htm">Do you speak French?
    <input type="radio" name="next_form" value="dutch.htm">Do you speak Dutch?
    <input type="radio" name="next_form" value="spanish.htm">Do you speak Spanish?
    <input type="radio" name="next_form" value="german.htm">Do you speak German?
    James Ivey
    Interested in calligraphy?
    www.iampeth.com

  6. #6
    Join Date
    Jan 2007
    Posts
    9

    Smile Re: Field dependent HTML confirmation mail

    Many thanks to all contributors for your time.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Mail "From" field
    By NOgbourne in forum FormMail Subscription Support
    Replies: 5
    Last Post: 19-Jun-2005, 02:32 AM
  2. Field contents seem to be truncated after the first word when sending plaintext mail
    By Greg Nickoloff in forum FormMail Subscription Support
    Replies: 0
    Last Post: 01-Apr-2005, 03:17 PM
  3. choice-dependent result URL
    By nevdev in forum FormMail Subscription Support
    Replies: 6
    Last Post: 13-Jan-2005, 09:32 PM
  4. SMTP delivery confirmation
    By matty in forum FormMail Subscription Support
    Replies: 5
    Last Post: 08-Dec-2004, 10:52 PM
  5. Creating mail object using Mail::factory ("smtp", ....) and FormMail
    By stingray in forum FormMail Subscription Support
    Replies: 1
    Last Post: 13-Jul-2004, 09:27 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
  •