имеется код, выпадающего списка, не могу организовать , чтобы по умолчанию был пустой option. Помогите , кто может:)
| Код |
|---|
<select name="DELIVERY_ID" id="DELIVERY_SELECT">
<?foreach ($arResult["DELIVERY"] as $delivery_id => $arDelivery){?>
<?if ($delivery_id !== 0 && intval($delivery_id) <= 0){
foreach ($arDelivery["PROFILES"] as $profile_id => $arProfile)
{?>
<option
id="ID_DELIVERY_<?=$delivery_id?>_<?=$profile_id?>"
value="<?= $delivery_id . ":" . $profile_id; ?>"
name="<?=htmlspecialcharsbx($arProfile["FIELD_NAME"])?>"
<?=$arProfile["CHECKED"] == "Y" ? "selected=\"selected\"" : "";?>
on click="submitForm();"
>
<?echo htmlspecialcharsbx($arDelivery["TITLE"])." (".htmlspecialcharsbx($arProfile["TITLE"]).")";?>
</option>
<?}
} else {
if (count($arDelivery["STORE"]) > 0)
$clickHandler = "on Click = \"fShowStore('".$arDelivery["ID"]."','".$arParams["SHOW_STORES_IMAGES"]."','".$width."','".SITE_ID."')\";";
else
$clickHandler = "on Click = \"BX('ID_DELIVERY_ID_".$arDelivery["ID"]."').selected=true;submitForm();\"";
?>
<option
id="ID_DELIVERY_ID_<?= $arDelivery["ID"] ?>"
value="<?= $arDelivery["ID"] ?>"
name="<?=htmlspecialcharsbx($arDelivery["FIELD_NAME"])?>"
<?=$arProfile["CHECKED"] == "Y" ? "selected=\"selected\"" : "";?>
<?=$clickHandler?>
>
<?echo htmlspecialcharsbx($arDelivery["NAME"]);?>
</option>
<?}?>
<?}?>
</select> |