I have a form that has a drop down box i need to expand to more than two selections currently i have a functions.php file with the code. I need some help if you could. On expanding the list. It shouldn't take much i would assume. I need to add
spare_needed
between open and closed.
I tried spreading it out to else if statements but that didn't work.
if($new_old == "open"){
$no_select = ' <option value="">SELECIONAR (SELECT ONE)</option>
<option value="open" selected>ABERTO (OPEN)</option>
<option value="closed">ENCERRADO (CLOSED)</option>';
}
else{
$no_select = ' <option value="">SELECIONAR (SELECT ONE)</option>
<option value="open">ABERTO (OPEN)</option>
<option value="closed" selected>ENCERRADO (CLOSED)</option>';
}
if(${'new_old' . $i} == "open"){
echo '<option value="">SELECIONAR (SELECT ONE)</option>
<option value="open" selected>ABERTO (OPEN)</option>
<option value="closed">ENCERRADO (CLOSED)</option>';
}
else if(${'new_old' . $i} == "closed"){
echo '<option value="">SELECIONAR (SELECT ONE)</option>
<option value="open">ABERTO (OPEN)</option>
<option value="closed" selected>ENCERRADO (CLOSED)</option>';
}
echo '
Aucun commentaire:
Enregistrer un commentaire