Dropdown Based Content

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">

   &lt;b&gt;&lt;?php echo CHtml::encode(&#036;data-&gt;getAttributeLabel('myv_sitefaq_id')); ?&gt;:&lt;/b&gt;


   &lt;?php echo CHtml::link(CHtml::encode(&#036;data-&gt;myv_sitefaq_id), array('view', 'id'=&gt;&#036;data-&gt;myv_sitefaq_id)); ?&gt;


   &lt;br /&gt;





   &lt;b&gt;&lt;?php echo CHtml::encode(&#036;data-&gt;getAttributeLabel('myv_sitefaq_question')); ?&gt;:&lt;/b&gt;


   &lt;?php echo CHtml::encode(&#036;data-&gt;myv_sitefaq_question); ?&gt;


   &lt;br /&gt;





   &lt;b&gt;&lt;?php echo CHtml::encode(&#036;data-&gt;getAttributeLabel('myv_sitefaq_answer')); ?&gt;:&lt;/b&gt;


   &lt;?php echo CHtml::encode(&#036;data-&gt;myv_sitefaq_answer); ?&gt;


   &lt;br /&gt;





   &lt;b&gt;&lt;?php echo CHtml::encode(&#036;data-&gt;getAttributeLabel('myv_sitefaq_status')); ?&gt;:&lt;/b&gt;


   &lt;?php echo CHtml::encode(&#036;data-&gt;myv_sitefaq_status); ?&gt;


   &lt;br /&gt;





   &lt;b&gt;&lt;?php echo CHtml::encode(&#036;data-&gt;getAttributeLabel('myv_sitefaq_type')); ?&gt;:&lt;/b&gt;


   &lt;?php echo CHtml::encode(&#036;data-&gt;myv_sitefaq_type); ?&gt;


   &lt;br /&gt;

</div>

Please Help me out…

Hi,

What is ur problem… which cannot be solvable for last days…

Just follow the below steps for searching functionality in clistview

http://www.yiiframework.com/wiki/229/filter-search-with-clistview/

http://www.yiiframework.com/forum/index.php/topic/18391-ajax-search-in-clistview/