The following warnings occurred:
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.1.27 (Linux)
File Line Function
/global.php 783 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.1.27 (Linux)
File Line Function
/global.php 783 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined variable $newpmmsg - Line: 40 - File: global.php(841) : eval()'d code PHP 8.1.27 (Linux)
File Line Function
/global.php(841) : eval()'d code 40 errorHandler->error
/global.php 841 eval
/printthread.php 16 require_once
Warning [2] Undefined array key "style" - Line: 909 - File: global.php PHP 8.1.27 (Linux)
File Line Function
/global.php 909 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined property: MyLanguage::$lang_select_default - Line: 5024 - File: inc/functions.php PHP 8.1.27 (Linux)
File Line Function
/inc/functions.php 5024 errorHandler->error
/global.php 909 build_theme_select
/printthread.php 16 require_once
Warning [2] Undefined array key "additionalgroups" - Line: 7162 - File: inc/functions.php PHP 8.1.27 (Linux)
File Line Function
/inc/functions.php 7162 errorHandler->error
/inc/functions.php 5044 is_member
/global.php 909 build_theme_select
/printthread.php 16 require_once
Warning [2] Undefined array key 1 - Line: 1415 - File: inc/functions.php PHP 8.1.27 (Linux)
File Line Function
/inc/functions.php 1415 errorHandler->error
/inc/functions.php 1370 fetch_forum_permissions
/printthread.php 76 forum_permissions
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 165 errorHandler->error



Form Tools
Email checkbox items as plain list - Printable Version

+- Form Tools (https://forums.formtools.org)
+-- Forum: Form Tools (https://forums.formtools.org/forumdisplay.php?fid=1)
+--- Forum: General Discussion (https://forums.formtools.org/forumdisplay.php?fid=5)
+--- Thread: Email checkbox items as plain list (/showthread.php?tid=636)



Email checkbox items as plain list - mja850 - Apr 5th, 2010

I have a large checklist that is grouped into several categories. I would like to have the form results emailed to me in the following format:

Category 1
Checkbox 1
Checkbox 2
Checkbox 3

Category 2
Checkbox 1
Checkbox 2
Checkbox 3

It seems the default display for checkbox groups is like this:
Checkbox 1, Checkbox 2, Checkbox 3

Unfortunately, I need the items in a plain, straightforward list with little to no formatting. I only need the boxes that are checked to be included in the emailed list.

Can anyone think of a way to get these results in the email? I am open to using radio yes/no type buttons if that would help.

The only solution I can think of is making each item a separate group, but that would take forever!

Thank you!


RE: Email checkbox items as plain list - Ben - Apr 10th, 2010

Hi mja,

Thanks for the post!

Just a couple quick questions / clarifiers:
(1) the checkboxes in all the categories are all stored in the same field in the database, correct?
(2) how many checkboxes are there?
(3) in the email, do you need to show the category to which the individual checkbox belongs?
(4) are you sending the email as HTML or text format (or both)? And you just want the list of checkboxes to be one per line, or one after the other on the same line?
(5) could you post your existing email template(s) so I could see what we're working with?

It should be do-able, though!

- Ben


RE: Email checkbox items as plain list - mja850 - Apr 10th, 2010

Hi Ben,

Thanks for the reply!

(1) Yes, each "category" of checkboxes is one database field
(2) There are about 70 checkboxes, but no more than 17 in a category
(3) I do need to show the categories in the email. I currently have the category name displayed within the if statement in the email.
(4) HTML currently, but plain text would be fine too. Correct, I basically want a list of the checkbox labels with <br> between them. I am literally trying to make a checklist that someone can tick off the items as they go. The goal is to generate a customized cleaning checklist for different cleaning jobs - the client is a cleaning company.
(5) Here is the email template:

<p><strong>Cleaning Checklist</strong></p>

{if $ANSWER_livingroom}
<p><strong>Living Room</strong><br>
{$ANSWER_livingroom}
</p>
{/if}

{if $ANSWER_diningroom}
<p><strong>Dining Room</strong><br>
{$ANSWER_diningroom}
</p>
{/if}

{if $ANSWER_kitchen}
<p><strong>Kitchen</strong><br>
{$ANSWER_kitchen}
</p>
{/if}

{if $ANSWER_familyroom}
<p><strong>Family Room</strong><br>
{$ANSWER_familyroom}
</p>
{/if}

{if $ANSWER_bedroom}
<p><strong>Bedrooms</strong><br>
{if $ANSWER_no_bedrooms}
Number of Bedrooms: {$ANSWER_no_bedrooms}<br>
{/if}
{$ANSWER_bedroom}
</p>
{/if}

{if $ANSWER_halls}
<p><strong>Halls/Stairways</strong><br>
{$ANSWER_halls}
</p>
{/if}

{if $ANSWER_office}
<p><strong>Office/Study</strong><br>
{$ANSWER_office}
</p>
{/if}

{if $ANSWER_bathroom}
<p><strong>Bathrooms</strong><br>
{if $ANSWER_no_bedrooms}
Number of Bathrooms: {$ANSWER_no_bathrooms}<br>
{/if}
{$ANSWER_bathroom}
</p>
{/if}

{if $ANSWER_playroom}
<p><strong>Playroom</strong><br>
{$ANSWER_playroom}
</p>
{/if}

{if $ANSWER_laundry}
<p><strong>Laundry Room</strong><br>
{$ANSWER_laundry}
</p>
{/if}


Thank you so much for your time and help! Form tools is awesome!

Mike



(Apr 10th, 2010, 9:55 AM)Ben Wrote: Hi mja,

Thanks for the post!

Just a couple quick questions / clarifiers:
(1) the checkboxes in all the categories are all stored in the same field in the database, correct?
(2) how many checkboxes are there?
(3) in the email, do you need to show the category to which the individual checkbox belongs?
(4) are you sending the email as HTML or text format (or both)? And you just want the list of checkboxes to be one per line, or one after the other on the same line?
(5) could you post your existing email template(s) so I could see what we're working with?

It should be do-able, though!

- Ben