Parašė fokosasxp· 2011 Bir. 7 23:06:24
#1
Pas manes taip yra
as noriu pasidaryti taip kategorijai OPTGROUP nelieciant kategorija tik gali lieti subkategorijas
ka reikia pakeisti cia visiskai nesuprantu padekite man.
<?if(!empty($this->view->defaultFormArray)){?>
<form name="publishForm" id="publishForm" method="POST" enctype="multipart/form-data">
<div style="margin-bottom:5px;"><b><?=Yii::t('publish_page', 'Category')?></b> (<span style="color:red;">*</span>)</div>
<div style="margin-bottom:5px;">
<select id="category_id" name="category_id" class="publish_select">
<?
foreach ($this->view->categoryList as $k => $v){?>
<?if($this->view->defaultFormArray['category_id'] == $k){?>
<option value="<?=$k?>" selected="selected"><?=$v?></option>
<?} else {?>
<option value="<?=$k?>"><?=$v?></option>
<?}//end of if?>
<?}//end of foreach?>
</select>
</div>
<?if(isset($this->view->errorArray['category_id'])){?>
<div class="publish_error"><?=$this->view->errorArray['category_id']?></div>
<?}?>
Redagavo fokosasxp· 2011 Bir. 8 00:06:33