csv import -checkbox formatting question

By rez - March 14, 2011

I have a form saving info to a csv file. Later, I want to import the csv file into cmsb. For the checkboxes, what values should I use to have them checked or unchecked in cmsb after importing later (since i can only use strings)?

Currently, I am using this for the checkboxes in my form:


<tr>
<td align="right">Interested In:</td>
<td>&nbsp;</td>
<td><input type="hidden" name="tastings" value="false" />
<label><input type="checkbox" name="tastings" value="true" />Pre-Opening Food Tastings</label>
</td>
</tr>

<tr>
<td align="right">&nbsp;</td>
<td>&nbsp;</td>
<td align="left" valign="top"><input type="hidden" name="coupons" value="false" />
<label><input type="checkbox" name="coupons" value="true">Discount Coupons</label>
</td>
</tr>


Which results in those cells in csv / excel being true or false strings. Will this result in checked or unchecked boxes in cmsb? hmmm... As i am writing this, i am thinking i should use the strings, 0 or 1. ? Will cmsb check boxes on import? unfortunately, that isnt as pretty in the e-mail that is also being sent for now to the client:

Interested in:
Pre-Opening Tastings
false

Discount Coupons
true

Anyway, please let me know the best way to handle this for now to get a nice import later when i make some type of newsletter subscription editors (example: coupon email list for all those marked "true")

Re: [rez] csv import -checkbox formatting question

By Jason - March 14, 2011

Hi,

CMS Builder stores checkboxes as having a value of either 1 or 0, so this is certainly the best option. If you do an import and give the field a value of 1, the check box will appear checked when you view the record in CMS Builder.

Hope this helps. Please let me know if you run into any other issues.

Thanks
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/