Fotiman

msg:4347213 | 3:23 pm on Aug 3, 2011 (gmt 0) |
I would probably do it more like this: <input type="checkbox" name="CURRENT-vendor" id="companyA" value="companyA" /> <label for="companyA">Company A</label>
<input type="checkbox" name="CURRENT-vendor" id="companyB" value="companyB" /> <label for="companyB">Company B</label>
|
| You are asking a single question: "Who are you a current vendor for?" The answer may contain multiple values. I think this is probably easier to maintain than asking multiple questions: "Are you a current vendor for CompanyA?" "Are you a current vendor for CompanyB?"
|
rwilson

msg:4347217 | 3:30 pm on Aug 3, 2011 (gmt 0) |
I've tried that but when I submit it I only see the question once and it fills in the last given answer CURRENT-vendor: companyB this shows up if both are selected. Is it because of the name attribute being the same? I'm using a basic php mail function
|
Fotiman

msg:4347229 | 3:49 pm on Aug 3, 2011 (gmt 0) |
You need to give the input a name ending in []. As in: <input type="checkbox" name="CURRENT-vendor[]" id="companyA" value="companyA" /> <label for="companyA">Company A</label> <input type="checkbox" name="CURRENT-vendor[]" id="companyB" value="companyB" /> <label for="companyB">Company B</label> Then you will be able to treat the result as an array in PHP. Like so: <?php print_r($_POST['CURRENT-vendor']); ?>
|
|
|
rwilson

msg:4347270 | 5:38 pm on Aug 3, 2011 (gmt 0) |
Cool, thank you!
|
|