PCHomepage
Programmer
On one site, I have a form that both allows multiple selections and it submits automatically. This is a dynamic form selector, generated in PHP, used for building a database query. However, identical code (as far as I can tell) on another site submits only a single value at a time for some reason and doesn't seem to allow for multiple selections. I realize that it will probably submit with each choice and it "remembers" the selection when making one but then loses it when I hold the CTRL and select another. If I choose a different selector (there are six of them) it loses the previous choices. Any ideas to get it working?
In this sample, for clarity only the first one is populated.
In this sample, for clarity only the first one is populated.
Code:
<p>Select Values:<br>
<select name="Value1[]" id="Value1[]" class="SelectBox" onchange='this.form.submit()' multiple size="5">
<option value="">Value 1</option>
<option value="2007.11.06">2007.11.06</option>
<option value="2008.01.14">2008.01.14</option>
<option value="2008.09.18">2008.09.18</option>
<option value="2008.10.27">2008.10.27</option>
<option value="2008.11.14">2008.11.14</option>
<option value="2008.11.17">2008.11.17</option>
<option value="2008.12.12">2008.12.12</option>
<option value="2008.12.23">2008.12.23</option>
<option value="2009.01.13">2009.01.13</option>
<option value="2009.01.19">2009.01.19</option>
</select><select name="Value2[]" id="Value2[]" class="SelectBox" onchange='this.form.submit()' multiple size="5">
<option value="">Value 2</option>
</select><select name="Value3[]" id="Value3[]" class="SelectBox" onchange='this.form.submit()' multiple size="5">
<option value="">Value 3</option>
</select><select name="Value4[]" id="Value4[]" class="SelectBox" onchange='this.form.submit()' multiple size="5">
<option value="">Value 4</option>
</select><select name="Value5[]" id="Value5[]" class="SelectBox" onchange='this.form.submit()' multiple size="5">
<option value="">Value 5</option>
</select><select name="Value6[]" id="Value6[]" class="SelectBox" onchange='this.form.submit()' multiple size="5">
<option value="">Value 6</option>
</select>