Forums

Multiple selection in a drop down list

lydbury 26 Jan, 2009
Grateful for your help. I have the following drop down list and would like to make it multiple select. I have tried multiple multiple="multiple" etc but I just get a frozen drop down list on the form and am not able to make any selection at all.

Many thanks,

Duncan

<tr>
<td valign="top">SPEAKING AND UNDERSTANDING</td>
<td valign="top">
<select name="Speaking" size="1">
<option selected>Please Select</option>
<option>Negotiations</option>
<option>Chairing or leading discussions</option>
<option>Formal meetings</option>
<option>Informal meetings</option>
<option>Making speeches</option>
<option>Giving presentations</option>
<option>Listening to talks</option>
<option>Telephone calls</option>
<option>Instructing, explaining, demonstrating</option>
<option>Social situations</option>
<option>Other</option>
</select>
</td>
</tr>
GreyHead 26 Jan, 2009
Hi Duncan,

From memory you need to set the size larger than 1 too.

Bob
lydbury 27 Jan, 2009
Dear Bob,

Thanks, that sorts out the selection - I can now select multiple items on the drop down list - but only the last item is emailed through. I.e. if I select 2 items, on the second item comes through.

My code is now below. I also tried it with multiple="multiple"

Cheers

Duncan
<td valign="top">SPEAKING AND UNDERSTANDING</td>
                <td valign="top">  
                    <select name="Speaking" id="Speaking" size="3" multiple>
                      <option selected>Not required</option>
                      <option>Negotiations</option>
                      <option>Chairing or leading discussions</option>
                      <option>Formal meetings</option>
                      <option>Informal meetings</option>
                      <option>Making speeches</option>
                      <option>Giving presentations</option>
                      <option>Listening to talks</option>
                      <option>Telephone calls</option>
                      <option>Instructing, explaining, demonstrating</option>
                      <option>Social situations</option>
                      <option>Other</option>
                    </select>
                  </td>
GreyHead 27 Jan, 2009
Hi Duncan,

Make the name into an array name name="Speaking[]"

Bob
lydbury 27 Jan, 2009
Thanks Bob - but if I do that, no results are emailed through at all.

I tried 3 different combinations (see below). The only successful result on the arriving email was from Writing - and that only had one result (the second) though I had selected two parameters.

Sorry to be a bore,

Duncan
<td valign="top">SPEAKING AND UNDERSTANDING</td>
                <td valign="top">  
                    <select name="Speaking[]" id="Speaking" size="3" multiple>
                     
                      <option>Negotiations</option>
                      <option>Chairing or leading discussions</option>
                      <option>Formal meetings</option>
                      <option>Informal meetings</option>
                      <option>Making speeches</option>
                      <option>Giving presentations</option>
                      <option>Listening to talks</option>
                      <option>Telephone calls</option>
                      <option>Instructing, explaining, demonstrating</option>
                      <option>Social situations</option>
                      <option>Other</option>
                    </select>
                  </td>
              </tr>
              <tr> 
                <td valign="top">READING</td>
                <td valign="top">  
                    <select name="Reading[]" id="Reading[]" size="3" multiple>
                     
                      <option>Memos</option>
                      <option>Letters</option>
                      <option>Emails</option>
                      <option>Reports</option>
                      <option>Professional and trade literature</option>
                      <option>Instruction manuals</option>
                      <option>Other</option>
                    </select>
                  </td>
              </tr>
              <tr> 
                <td valign="top">WRITING</td>
                <td valign="top">  
                    <select name="Writing" id="Writing" size="3" multiple>
                     
                      <option>Memos and letters</option>
                      <option>Emails</option>
                      <option>Reports</option>
                      <option>Other</option>
                    </select>
                  </td>
              </tr>
              <tr>
GreyHead 27 Jan, 2009
Hi Duncan,

I took your code and put it into a new form (I just added the missing table tags), I set up a minimal email with the default template and everything looks fine except for Writing which only returns the last result as it should.

So what do you get with DeBug?

Bob
lydbury 27 Jan, 2009
Thanks Bob,

Scratching heads....

Duncan
This topic is locked and no more replies can be posted.