Results 1 to 3 of 3

Thread: Help with mail_options and conditions

  1. #1
    Join Date
    Jul 2004
    Posts
    2

    Default Help with mail_options and conditions

    How do you provide the field list for the Exclude mail_option? Is it like this:
    <input type="hidden" name="mail_options" value="Exclude=field1,field2,field3">

    Can you show an html code example of how to use multiple mail_options?

    I'm trying to specify a condition for an input to only allow 6 digits. However, my conditions seem to never be checked.

    Is this the correct syntax:
    <input type="hidden" name="conditions" value="@TEST@field1~(/d){6}@Field #1 can only contain digits.@">

    Thanks for the help!

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

    Default Re: Help with mail_options and conditions

    Hi,

    Because the mail_options are separated by comma, you can not list a number of Exclude values by comma.

    So, you need to separate them by semicolon:

    Code:
    <input type="hidden" name="mail_options" value="Exclude=field1;field2;field3">
    With the syntax you used, you should have received an alert message that said something like this "Some mail_options settings are undefined", which then listed your field2, field3, etc.

    For conditions, you need to specify two delimiter characters at the start:
    Code:
    <input type="hidden" name="conditions" value=":@TEST@field1~(/d){6}@Field #1 can only contain digits.@">
    The first character you specify ":" is the list separator. The second character "@" is the internal separator.

    You need the list separator even if you're only providing one condition.

    You should have received an alert message with at least one error message with the syntax you used. Did you get such an alert?

    Also, for the test you want, here's the correct pattern:

    Code:
    <input type="hidden" name="conditions" value=":@TEST@num~/\\d{6}/@Field #1 can only contain digits.@">
    Let me know how you go. We're planning to write a HOWTO guide for conditions "real soon now"
    Russell Robinson - Author of Tectite FormMail and FormMailDecoder
    http://www.tectite.com/

  3. #3
    Join Date
    Jul 2004
    Posts
    2

    Smile Re: Help with mail_options and conditions

    Thanks, that cleared it up. The instructions provided in the code was a little vague. These examples would be perfect for the HOWTO.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Conditions for a valid email address
    By bwv in forum FormMail Subscription Support
    Replies: 5
    Last Post: 04-Jul-2005, 08:24 PM
  2. Conditions: Can we use PHP predefined regex?
    By railer in forum FormMail Subscription Support
    Replies: 2
    Last Post: 14-May-2005, 04:06 PM
  3. Sample Conditions Code
    By railer in forum FormMail Subscription Support
    Replies: 1
    Last Post: 14-May-2005, 04:01 PM
  4. help with conditions
    By brian in forum FormMail Subscription Support
    Replies: 19
    Last Post: 12-Mar-2005, 07:52 PM
  5. mail_options and template problems
    By middric in forum FormMail Subscription Support
    Replies: 1
    Last Post: 09-Jan-2005, 08:29 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
  •