Hi,
I have a big query which im unable to solve for past days… Please Help me out…
I’m working on FAQ type Screen, I have a Table which contains question,answer and type, Type is of ENUM values…
In the list view screen i need a dropdown for type and based on type selection, questions and answer to be displayed.
This is my index.php in views folder:
<h1>Myv Sitefaqs</h1>
<form>
<center>
<label><b>FAQ Type:</b></label>
<select name="myv_sitefaq_type">
<option value="MyVeedu">MyVeedu</option>
<option value="JointVenture">JointVenture</option>
<option value="Builder">Builder</option>
<option value="Association">Association</option>
</select>
<input type ="button" value="Go" />
<!–<input type="submit" value="New" />–>
</form>
</center><br>
<?php $this->widget(‘zii.widgets.CListView’, array(‘dataProvider’=>$dataProvider,‘itemView’=>’_view’,‘sortableAttributes’=>array(
‘myv_sitefaq_id’
),
));
and this is my _view.php in views folder:
<?php
/* @var $this MyvSitefaqController */
/* @var $data MyvSitefaq */
?>
<div class="view">
<b><?php echo CHtml::encode($data->getAttributeLabel('myv_sitefaq_id')); ?>:</b>
<?php echo CHtml::link(CHtml::encode($data->myv_sitefaq_id), array('view', 'id'=>$data->myv_sitefaq_id)); ?>
<br />
<b><?php echo CHtml::encode($data->getAttributeLabel('myv_sitefaq_question')); ?>:</b>
<?php echo CHtml::encode($data->myv_sitefaq_question); ?>
<br />
<b><?php echo CHtml::encode($data->getAttributeLabel('myv_sitefaq_answer')); ?>:</b>
<?php echo CHtml::encode($data->myv_sitefaq_answer); ?>
<br />
<b><?php echo CHtml::encode($data->getAttributeLabel('myv_sitefaq_status')); ?>:</b>
<?php echo CHtml::encode($data->myv_sitefaq_status); ?>
<br />
<b><?php echo CHtml::encode($data->getAttributeLabel('myv_sitefaq_type')); ?>:</b>
<?php echo CHtml::encode($data->myv_sitefaq_type); ?>
<br />
</div>
Please Help me out…