表单 - 选择列表不起作用,但复选框可以

时间:2014-02-05 19:09:48

标签: forms constantcontact

不允许以下选择列表起作用的错误是什么?

创建电子邮件注册表单(常量联系人)。使用常量联系人表单生成器,我尝试将“邮件列表选项”从复选框更改为下拉菜单 - 但这样做会导致联系人信息被添加到所有邮件列表,而不是所选的单个列表

选择列表代码:(不工作)

<select>
<option name="Customer Type" ID="">Please select...</option>
<option  value="Architect/Designer" name="Lists[]" id="list_Architect/Designer" />Architect/Designer</option>
<option  value="AV/Media/Broadcast" name="Lists[]" id="list_AV/Media/Broadcast" />AV/Media/Broadcast</option>
<option  value="Command/Control" name="Lists[]" id="list_Command/Control" />Command/Control</option>
</select>

复选框代码:(工作)

<input type="checkbox"  checked="checked"  value="Architect/Designer" name="Lists[]" id="list_Architect/Designer" />
<label for="list_Architect/Designer">Architect/Designer</label><br />

<input type="checkbox"  value="AV/Media/Broadcast" name="Lists[]" id="list_AV/Media/Broadcast" />
<label for="list_AV/Media/Broadcast">AV/Media/Broadcast</label><br />

<input type="checkbox"  value="Command/Control" name="Lists[]" id="list_Command/Control" />
<label for="list_Command/Control">Command/Control</label><br />

1 个答案:

答案 0 :(得分:0)

您需要选择多个

<select multiple='multiple'>

 <option name="Customer Type" ID="">Please select...</option>
 <option  value="Architect/Designer" name="Lists[]" id="list_Architect/Designer" />Architect/Designer</option>
 <option  value="AV/Media/Broadcast" name="Lists[]" id="list_AV/Media/Broadcast" />AV/Media/Broadcast</option>
 <option  value="Command/Control" name="Lists[]" id="list_Command/Control" />Command/Control</option>
 </select>