2014-02-05 61 views
0

不允許下面的選擇列表工作的錯誤是什麼?表單 - 選擇列表不起作用,但複選框做

創建一個電子郵件註冊表單(常量聯繫人)。使用常量聯繫人表單生成器,我試圖將「郵件列表選項」從複選框更改爲下拉菜單 - 但這樣做會導致聯繫人信息被添加到所有郵件列表中,而不是被選中的單個列表。

選擇列表中的代碼:(不工作)

<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 /> 
+0

如果你仍然感興趣,我很樂意發佈這是一個真正的答案... – jedison

回答

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>