I am working on a website which is generating the 'Quantity' dropdown menu via PHP. I would like to change this to an input field instead so people can manually type in how many products they'd like to buy.
The original developer has the input field being made with PHP etc. I've pasted the code of how it's making the dropdown so you can see what needs changing. Just unsure what to change exactly. I've also pasted the link to the page it can be found on.
$frm_qty = new Select($db,'quantity['.$row_rsPO['optionName'].']','jq_qty',($_POST['quantity'][$row_rsPO['optionName']]?$_POST['quantity'][$row_rsPO['optionName']]:1),'');
for ($i=1;$i<=14; $i+=1 ) $frm_qty->newOption($i,$i);
$frm_qty->writeLabel(); $frm_qty->write();
?>
<input id="poOptionType" type="hidden" name="poOptionType" value="<?php echo $row_rsPO['optionType']; ?>" />
<?php echo '</td><td> </td>'; ?>
Not entirely sure if i've pasted enough here, so i've also copied all code into pastebin. I've pasted below what can be seen front end from view-source on the page.
HTML
<form method="post" id="jq_form">
<label for="quantity[]"></label>
<select onblur="" name="quantity[]" id="quantity[]" class="jq_qty" onchange="" style="" size="">
<option value="1" selected="selected">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
<option value="9">9</option>
<option value="10">10</option>
<option value="11">11</option>
<option value="12">12</option>
<option value="13">13</option>
<option value="14">14</option>
</select>
<input id="poOptionType" type="hidden" name="poOptionType" value="" /></form>
live url - http://bit.ly/1bm02Kq
pastebin - http://pastebin.com/SpiJTwFw
poOp(..)Typehihi. But seriously: What have you tried? It seems like you can dump most of the pasted code and either manually print an input field or look for a classInpute.g. that your original programmer may have written just like he wroteSelect