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

Thread: Specify recipients with checkboxes

  1. #1
    Join Date
    Feb 2007
    Posts
    5

    Question Specify recipients with checkboxes

    Hi

    I am trying to make a multipage form with a last page where the user can choose between multiple recipients by checking or unchecking checkboxes.

    Example (will send to recipient 1 and 3):

    Has anyone done that, or got an idea how to..

    Thank You!

  2. #2
    Join Date
    Dec 2005
    Posts
    74

    Default Re: Specify recipients with checkboxes

    Three feet of snow in the last 24h, more on the way, so I thought I'd see what I could do with this. The bottom line, you can't get there from here. You'd have to create a comma-delimited list of recipients and formmail doesn't seem to like concatenating a comma to a field in the derive_fields %if(...) conditional. A bit odd, since it does allow an explicit comma.

    George

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

    Default Re: Specify recipients with checkboxes

    append the comma outside the %if(..)%

    multiple commas with no value between them are OK in FormMail special fields (i think), like recipients

  4. #4
    Join Date
    Dec 2005
    Posts
    74

    Default Re: Specify recipients with checkboxes

    Thnx - had to be the snow has addled my brain. This seems to work:

    HTML Code:
    <input type="hidden" name="derive_fields" value="recipients=
    %if(rec1;rec1;%''%)%.%2C%.
    %if(rec2;rec2;%''%)%.%2C%.
    %if(rec3;rec3;%''%)%.%2C%.
    %if(rec4;rec4;%''%)%
     " />
    
    A: <input type="checkbox" name="rec1" value="a@bogus.info"><br />
    B: <input type="checkbox" name="rec2" value="b@bogus.info"><br />
    C: <input type="checkbox" name="rec3" value="c@bogus.info"><br />
    D: <input type="checkbox" name="rec4" value="d@bogus.info"><br />  


    George

  5. #5
    Join Date
    Feb 2007
    Posts
    5

    Default Re: Specify recipients with checkboxes

    It works! Thanks a lot!

    However the script sends an errormessage, seems like it dosn't handle the "," in the recipients-field.

    But that's a minor problem, and propably not difficult to fix.

    Again, thanks a lot!

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

    Default Re: Specify recipients with checkboxes

    seems like it dosn't handle the "," in the recipients-field.
    thats surprizing...

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

    Default Re: Specify recipients with checkboxes

    Hi,

    However the script sends an errormessage, seems like it dosn't handle the "," in the recipients-field.
    Yes, FormMail doesn't like empty recipients, for example:

    HTML Code:
    value="me@nowhere.com,,,,you@somewhere.com"
    It's being too helpful and telling you about these problems...

    There's probably no good reason to complain about a few empty recipients, so I'll improve that in the next version.

    If you can live with the error messages for a while, the upgrade will stop them.
    Russell Robinson - Author of Tectite FormMail and FormMailDecoder
    http://www.tectite.com/

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

    Default Re: Specify recipients with checkboxes

    russ, u never cease to amaze me...

  9. #9
    Join Date
    Feb 2007
    Posts
    5

    Thumbs up Re: Specify recipients with checkboxes

    Hi

    It is absolutely no problem!

    Thanks!

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

    Default Re: Specify recipients with checkboxes

    Hi,

    OK, version 7.14 of FormMail will allow you to have empty addresses without complaining (provided there's at least one valid address).

    Please let me know if you have any problems with this new feature.
    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. Selectable Recipients?
    By clicker in forum FormMail Subscription Support
    Replies: 3
    Last Post: 08-Apr-2004, 10:18 AM
  2. no valid recipients were specified.
    By SonSon in forum FormMail Subscription Support
    Replies: 3
    Last Post: 08-Apr-2004, 07:27 AM
  3. no Action or recipients
    By Lars Arvoe in forum FormMail Subscription Support
    Replies: 7
    Last Post: 05-Apr-2004, 07:13 AM
  4. recipients error
    By mike.2004 in forum FormMail Subscription Support
    Replies: 3
    Last Post: 30-Mar-2004, 10:36 PM
  5. No valid recipients
    By Oktopuz in forum FormMail Subscription Support
    Replies: 2
    Last Post: 06-Feb-2004, 05:48 AM

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
  •