Checkbox not working in email

huntercreation 04 Oct, 2010
Hello All,

I have tried many different ways of using the tags for the email but I cannot get the form to publish a users selections.

In the form it looks like this:

Our Products

Gourmet Cookie Dough
Cheese Cake
Cinnamon/Pumpkin Rolls
Braided Bread
Pizzas
Tillamook Country Smoker
Gourmet Coffee Beans
Candy Bars
Smencils
Gift Wrap
Pizza Cards
Buy 1 Get 1 Free Cards

In the email the result is this:

Requested Information

Our Products:
{check1}
{check2}
{check3}
{check4}
{check5}
{check6}
{check7}
{check8}
{check9}
{check10}
{check11}
{check12}

I would like to have only their selections visible in the email, on another thread here there was a suggested patch as this was a problem is this the solution or do I have to add some different code. To make it work. I have attached the form code just incase:

<div class="form_item">
  <div class="form_element cf_heading">
    <h2 class="cf_text">School/Group or Organization</h2>
  </div>
  <div class="cfclear"> </div>
</div>

<div class="form_item">
  <div class="form_element cf_textbox">
    <label class="cf_label" style="width: 150px;"></label>
    <input class="cf_inputbox" maxlength="150" size="30" title="" id="text_24" name="school or group" type="text" />
  
  </div>
  <div class="cfclear"> </div>
</div>

<div class="form_item">
  <div class="form_element cf_heading">
    <h2 class="cf_text">Contact Information:</h2>
  </div>
  <div class="cfclear"> </div>
</div>

<div class="form_item">
  <div class="form_element cf_textbox">
    <label class="cf_label" style="width: 150px;">Sponsor Name:</label>
    <input class="cf_inputbox" maxlength="150" size="30" title="" id="text_3" name="sponsor_name" type="text" />
  
  </div>
  <div class="cfclear"> </div>
</div>

<div class="form_item">
  <div class="form_element cf_textbox">
    <label class="cf_label" style="width: 150px;">email:</label>
    <input class="cf_inputbox validate-email" maxlength="150" size="30" title="" id="text_2" name="email" type="text" />
  
  </div>
  <div class="cfclear"> </div>
</div>

<div class="form_item">
  <div class="form_element cf_textbox">
    <label class="cf_label" style="width: 150px;">City:</label>
    <input class="cf_inputbox validate-alpha" maxlength="150" size="30" title="" id="text_5" name="city_01" type="text" />
  
  </div>
  <div class="cfclear"> </div>
</div>

<div class="form_item">
  <div class="form_element cf_textbox">
    <label class="cf_label" style="width: 150px;">State:</label>
    <input class="cf_inputbox validate-alpha" maxlength="150" size="30" title="" id="text_6" name="state_01" type="text" />
  
  </div>
  <div class="cfclear"> </div>
</div>

<div class="form_item">
  <div class="form_element cf_heading">
    <h3 class="cf_text">Phone Numbers</h3>
  </div>
  <div class="cfclear"> </div>
</div>

<div class="form_item">
  <div class="form_element cf_textbox">
    <label class="cf_label" style="width: 150px;">Home:</label>
    <input class="cf_inputbox" maxlength="150" size="30" title="" id="text_7" name="home_ph" type="text" />
  
  </div>
  <div class="cfclear"> </div>
</div>

<div class="form_item">
  <div class="form_element cf_textbox">
    <label class="cf_label" style="width: 150px;">Work:</label>
    <input class="cf_inputbox" maxlength="150" size="30" title="" id="text_8" name="work_ph" type="text" />
  
  </div>
  <div class="cfclear"> </div>
</div>

<div class="form_item">
  <div class="form_element cf_textbox">
    <label class="cf_label" style="width: 150px;">Mobile:</label>
    <input class="cf_inputbox" maxlength="150" size="30" title="" id="text_9" name="mobile" type="text" />
  
  </div>
  <div class="cfclear"> </div>
</div>

<div class="form_item">
  <div class="form_element cf_heading">
    <h2 class="cf_text">School Information:</h2>
  </div>
  <div class="cfclear"> </div>
</div>

<div class="form_item">
  <div class="form_element cf_textbox">
    <label class="cf_label" style="width: 150px;">Name:</label>
    <input class="cf_inputbox" maxlength="150" size="30" title="" id="text_20" name="school_name" type="text" />
  
  </div>
  <div class="cfclear"> </div>
</div>

<div class="form_item">
  <div class="form_element cf_textbox">
    <label class="cf_label" style="width: 150px;">Street:</label>
    <input class="cf_inputbox" maxlength="150" size="30" title="" id="text_24" name="school_street" type="text" />
  
  </div>
  <div class="cfclear"> </div>
</div>

<div class="form_item">
  <div class="form_element cf_textbox">
    <label class="cf_label" style="width: 150px;">City:</label>
    <input class="cf_inputbox" maxlength="150" size="30" title="" id="text_25" name="school_city" type="text" />
  
  </div>
  <div class="cfclear"> </div>
</div>

<div class="form_item">
  <div class="form_element cf_textbox">
    <label class="cf_label" style="width: 150px;">State:</label>
    <input class="cf_inputbox" maxlength="150" size="30" title="" id="text_27" name="school_state" type="text" />
  
  </div>
  <div class="cfclear"> </div>
</div>

<div class="form_item">
  <div class="form_element cf_textbox">
    <label class="cf_label" style="width: 150px;">Zip Code:</label>
    <input class="cf_inputbox" maxlength="150" size="30" title="" id="text_28" name="zip_code" type="text" />
  
  </div>
  <div class="cfclear"> </div>
</div>

<div class="form_item">
  <div class="form_element cf_heading">
    <h3 class="cf_text">School Phone:</h3>
  </div>
  <div class="cfclear"> </div>
</div>

<div class="form_item">
  <div class="form_element cf_textbox">
    <label class="cf_label" style="width: 150px;">Main:</label>
    <input class="cf_inputbox" maxlength="150" size="30" title="" id="text_31" name="school_phone" type="text" />
  
  </div>
  <div class="cfclear"> </div>
</div>

<div class="form_item">
  <div class="form_element cf_textbox">
    <label class="cf_label" style="width: 150px;">Fax:</label>
    <input class="cf_inputbox" maxlength="150" size="30" title="" id="text_32" name="school_fax" type="text" />
  
  </div>
  <div class="cfclear"> </div>
</div>

<div class="form_item">
  <div class="form_element cf_textbox">
    <label class="cf_label" style="width: 150px;">School Email:</label>
    <input class="cf_inputbox" maxlength="150" size="30" title="" id="text_32" name="school_email" type="text" />
  
  </div>
  <div class="cfclear"> </div>
</div>

<div class="form_item">
  <div class="form_element cf_heading">
    <h2 class="cf_text">Requested Information</h2>
  </div>
  <div class="cfclear"> </div>
</div>

<div class="form_item">
  <div class="form_element cf_heading">
    <h4 class="cf_text">Our Products</h4>
  </div>
  <div class="cfclear"> </div>
</div>

<div class="form_item">
  <div class="form_element cf_checkbox">
    <label class="cf_label" style="width: 150px;"></label>
    <div class="float_left">
      <input value="Gourmet Cookie Dough" title="" class="radio" id="check00" name="check0[]" type="checkbox" />
      <label for="check00" class="check_label">Gourmet Cookie Dough</label>
      <br />
      
<input value="Cheese Cake" title="" class="radio" id="check01" name="check0[]" type="checkbox" />
      <label for="check01" class="check_label">Cheese Cake</label>
      <br />
      
<input value="Cinnamon/Pumpkin Rolls" title="" class="radio" id="check02" name="check0[]" type="checkbox" />
      <label for="check02" class="check_label">Cinnamon/Pumpkin Rolls</label>
      <br />
      
<input value="Braided Bread" title="" class="radio" id="check03" name="check0[]" type="checkbox" />
      <label for="check03" class="check_label">Braided Bread</label>
      <br />
      
<input value="Pizzas" title="" class="radio" id="check04" name="check0[]" type="checkbox" />
      <label for="check04" class="check_label">Pizzas</label>
      <br />
      
<input value="Tillamook Country Smoker" title="" class="radio" id="check05" name="check0[]" type="checkbox" />
      <label for="check05" class="check_label">Tillamook Country Smoker</label>
      <br />
      
<input value="Gourmet Coffee Beans" title="" class="radio" id="check06" name="check0[]" type="checkbox" />
      <label for="check06" class="check_label">Gourmet Coffee Beans</label>
      <br />
      
<input value="Candy Bars" title="" class="radio" id="check07" name="check0[]" type="checkbox" />
      <label for="check07" class="check_label">Candy Bars</label>
      <br />
      
<input value="Smencils" title="" class="radio" id="check08" name="check0[]" type="checkbox" />
      <label for="check08" class="check_label">Smencils</label>
      <br />
      
<input value="Gift Wrap" title="" class="radio" id="check09" name="check0[]" type="checkbox" />
      <label for="check09" class="check_label">Gift Wrap</label>
      <br />
      
<input value="Pizza Cards" title="" class="radio" id="check010" name="check0[]" type="checkbox" />
      <label for="check010" class="check_label">Pizza Cards</label>
      <br />
      
<input value="Buy 1 Get 1 Free Cards" title="" class="radio" id="check011" name="check0[]" type="checkbox" />
      <label for="check011" class="check_label">Buy 1 Get 1 Free Cards</label>
      <br />
      

    </div>
    
  </div>
  <div class="cfclear"> </div>
</div>

<div class="form_item">
  <div class="form_element cf_textbox">
    <label class="cf_label" style="width: 150px;">Month to start:</label>
    <input class="cf_inputbox" maxlength="150" size="30" title="" id="text_18" name="month_to_start" type="text" />
  
  </div>
  <div class="cfclear"> </div>
</div>

<div class="form_item">
  <div class="form_element cf_heading">
    <h3 class="cf_text">Interested in buying products? Give us your address and we will find you a fundraiser in your area and provide you with contact information. </h3>
  </div>
  <div class="cfclear"> </div>
</div>

<div class="form_item">
  <div class="form_element cf_textarea">
    <label class="cf_label" style="width: 150px;">Your Address:</label>
    <textarea class="cf_inputbox" rows="3" id="text_35" title="" cols="30" name="address_02"></textarea>
    
  </div>
  <div class="cfclear"> </div>
</div>

<div class="form_item">
  <div class="form_element cf_textarea">
    <label class="cf_label" style="width: 150px;">Comments or Questions:</label>
    <textarea class="cf_inputbox" rows="3" id="text_36" title="" cols="30" name="comments"></textarea>
    
  </div>
  <div class="cfclear"> </div>
</div>

<div class="form_item">
  <div class="form_element cf_button">
    <input value="Submit" name="button_37" type="submit" />
  </div>
  <div class="cfclear"> </div>
</div>

<div class="form_item">
  <div class="form_element cf_text"> <span class="cf_text"></span> </div>
  <div class="cfclear"> </div>
</div>

<div class="form_item">
  <div class="form_element cf_text"> <span class="cf_text"></span> </div>
  <div class="cfclear"> </div>
</div>

<div class="form_item">
  <div class="form_element cf_text"> <span class="cf_text"></span> </div>
  <div class="cfclear"> </div>
</div>
GreyHead 05 Oct, 2010
Hi huntercreation,

The input name in the Form HTML is the array name check0[] so you need {check0} in the Email Template. You'll also need to set "ChronoForms handle my posted arrays" to 'Yes' in the Form Editor General Tab.

This will give you a comma separated list in the Email. If you prefer a vertical list then you can handle the posted arrays yourself in the OnSubmit Before box.

There's a different approach to a similar question in this post

Bob
huntercreation 05 Oct, 2010
Thanks Greyhead,

Made the changes and it worked perfectly. You made my day.

Have a good one.

Patrick
This topic is locked and no more replies can be posted.