+ Reply to Thread
Results 1 to 10 of 12

Thread: Displaying checked boxes in html mail

Hybrid View

  1. #1
    Join Date
    May 2006
    Posts
    3

    Default Displaying checked boxes in html mail

    I read your response to displaying radio boxes in an emailed form, which couldn't be done in '03 when the message was posted, but you said:

    "To show as radio buttons instead is quite tricky. However, we do have the technology to achieve this, so we've put the idea on our TO-DO list for FormMail."

    Wondering if you've conquered this?

    I'd like to display checked checkboxes...

    Any help?

    Thanks,

    Teri

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

    Default Re: Displaying checked boxes in html mail

    Hi,

    Yes, using derive_fields with the %if% feature, you can generate a new field with the value "checked" if the radio/checkbox value is on.

    You then include this new field in your HTML email template in the appropriate HTML tag, and the radio/checkbox will be shown.

    For radio buttons, you'll need to derive several fields (one for each radio button value).
    Russell Robinson - Author of Tectite FormMail and FormMailDecoder
    http://www.tectite.com/

  3. #3
    Join Date
    May 2006
    Posts
    3

    Default Re: Displaying checked boxes in html mail

    Hm. Can't seem to find any ref whatsoever in the script or the forums for %if%.

    Another clue?

    Densely,

    T

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

    Default Re: Displaying checked boxes in html mail

    Hi,

    Check out this HOW TO guide: http://www.tectite.com/fmhowto/derived.php
    Russell Robinson - Author of Tectite FormMail and FormMailDecoder
    http://www.tectite.com/

  5. #5
    Join Date
    Jan 2007
    Posts
    4

    Default Re: Displaying checked boxes in html mail

    Has anyone figured this out yet? I'm working on trying to get radio buttons to work with no luck. Help anyone??

  6. #6
    Join Date
    Jan 2007
    Posts
    12

    Default Re: Displaying checked boxes in html mail

    Hi, I also tried too long, but now I got mine working with checkboxes, which should be similar to radio's.

    Put in the form a derive filed like this:
    <input type="hidden" name="derive_fields" value="new_checkbox=%if(old_checkbox;%'checked'%; (keep clear) %''%)%,">
    (delete the (keep clear) in the form, it must be empty)

    the checkbox in the good_url or here in the email_template must have the name "new_checkbox", the same checkbox in the original form must have the name "old checkbox".

    now for the email_template or good_url, instead of typing in $old_checkbox you put in the following line (here checkbox), where you want the box (or radio's):
    <input type="checkbox" name="news" value="ON" $new_checkbox>

    result: because of the derive_field, the $new_checkbox is replaced by checked oder left empty, what means that you get a checked or not checked checkbox.

    not mx best english, but I hope I could help you. First time I wrote in a forum.

  7. #7
    Join Date
    Mar 2008
    Posts
    11

    Default Re: Displaying checked boxes in html mail

    I'm trying to do this as well and you guys have totally lost me.

    radio buttons and check boxes both have a field name and a value, so I set them both up the same on my site. The radio buttons work fine, the check boxes not so much... when multiple boxes are checked it seems to randomly pick one and populate the value....

    ive stared at this screen so long my eyes are dry and I have a headache lol

  8. #8
    Join Date
    Jan 2007
    Posts
    12

    Default Re: Displaying checked boxes in html mail

    Hi,

    I myself only have one checkbox in my form, so I don't have any idea what is going on there.
    But if it randomly picks a checkbox, i guess there is a problem with the ID's (names) of the fields.
    I guess you have to put in as much deriving fields ("new_checkbox01, new_checkbox02") as you have fileds with checkboxes.
    Let me know if that will make any difference.

    In case it's not working I will try some coding.

  9. #9
    Join Date
    Mar 2008
    Posts
    11

    Default Re: Displaying checked boxes in html mail

    I guess I don't understand what you mean or why a field is derived if it's a check box.

    What am I using for new check box and old checkbox and where am I getting these values?

    EX: My site is a dog rescue application so we ask all sorts of details about their lives, like what type of setting they live in, so the options are:

    rural
    suburban
    urban
    acreage
    waterfront

    and the list goes on

    Any help is really appreciated.... thx

    Hi, I also tried too long, but now I got mine working with checkboxes, which should be similar to radio's.

    Put in the form a derive filed like this:
    <input type="hidden" name="derive_fields" value="new_checkbox=%if(old_checkbox;%'checked'%; (keep clear) %''%)%,">
    (delete the (keep clear) in the form, it must be empty)

    the checkbox in the good_url or here in the email_template must have the name "new_checkbox", the same checkbox in the original form must have the name "old checkbox".

    now for the email_template or good_url, instead of typing in $old_checkbox you put in the following line (here checkbox), where you want the box (or radio's):
    <input type="checkbox" name="news" value="ON" $new_checkbox>

    result: because of the derive_field, the $new_checkbox is replaced by checked oder left empty, what means that you get a checked or not checked checkbox.

    not mx best english, but I hope I could help you. First time I wrote in a forum.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

     

Similar Threads

  1. Displaying submission fields
    By Render in forum Community Support
    Replies: 12
    Last Post: 03-Mar-2006, 11:23 PM
  2. Help with validating check boxes with conditions
    By nielsen@ninthvector.com in forum Community Support
    Replies: 1
    Last Post: 17-Feb-2006, 10:00 PM
  3. Replies: 0
    Last Post: 16-Feb-2006, 10:56 AM
  4. how to stop error codes displaying
    By piemanek in forum FormMail Subscription Support
    Replies: 1
    Last Post: 13-Sep-2005, 11:02 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, 10: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