I have a situation where I need a dynamic number of checkboxes. The checkboxes actually relate to a specific “products” weblog. They keep growing in number, so I wouldn’t be able to have a unique field in Freeform for each. I know that a multiselect can be converted into a checkbox list, but unfortunately that won’t work in this situation. The layout divides out the posts by categories into columns. Is there a way with some sort of JS or PHP to take checkboxes labeled in a certain way and join them together and put them in one field on submission? I’m not really a wiz in these matters, so I don’t know what is possible. But what I would want is for there to be checkboxes output for each product in the products weblog. And on submission all the checkboxes get inserted into 1 field with a comma separating them ("dogs, cats, birds, fish").
The form I am trying to recreate is here: http://hawkridgesys.com/forms/ql-quote-form.html
Would giving each checkbox the same name with ‘[]’ at the end work or is that only for multi-select lists? Like in the documentation example here: http://www.solspace.com/docs/entry/freeform_26_form_tag/#example_3
Would this work?
<input name="products[]" value="Dogs" type="checkbox">Dogs<br>
<input name="products[]" value="Cats" type="checkbox">Cats<br>
<input name="products[]" value="Birds" type="checkbox">Birds<br>
