Note that there are some explanatory texts on larger screens.

plurals
  1. POyii cgridview input text and select filter is disabled
    text
    copied!<p>[EDIT] There are just some js code that I used for sorting that disables the selection the div container.</p> <p>I am using the Yii cgridview to show my data. But I cannot type into the input text field and cannot select from the select/dropdown, these are the filter options on the cgridview. By the way, the data is from a view, not a from a regular table.</p> <p>Below are codes on my controller,</p> <pre><code>$request = new Request; $request-&gt;unsetAttributes(); if(isset($_GET['Request']) $request-&gt;attributes=$_GET['Request']; $this-&gt;render('index', array( 'request' =&gt; $request, )); </code></pre> <p>Below are the safe fields on the model,</p> <pre><code>array('request_id, facility_id, client_id, status, description, submitted_by, submitted, acknowledge, req_type', 'safe') </code></pre> <p>Below are the codes on the model search method</p> <pre><code>function setRequests(){ $criteria = new CDbCriteria; $criteria-&gt;compare('req_type',$this-&gt;req_type, true); $criteria-&gt;compare('description', $this-&gt;description, true); $criteria-&gt;compare('status', $this-&gt;status, true); return new CActiveDataProvider($this, array( 'criteria' =&gt; $criteria, 'pagination'=&gt;array('pageSize'=&gt;5), )); } </code></pre> <p>Below are the codes on the view file.</p> <pre><code>$this-&gt;widget('zii.widgets.grid.CGridView', array( 'id'=&gt;'request-clist', 'dataProvider'=&gt;$request-&gt;setRequests(), 'filter'=&gt;$request, 'columns'=&gt; array( array('name'=&gt;'req_type', 'header'=&gt;'Item', 'value'=&gt;'CHtml::link($data-&gt;req_type, array($data-&gt;url));', 'type'=&gt;'raw', 'filter' =&gt; CHtml::dropDownList('Request[req_type]', $request-&gt;req_type, array( 'Notice' =&gt; 'Notice', 'FAR' =&gt; 'FAR', 'PC' =&gt; 'PC', 'EM'=&gt;'EM', 'RH'=&gt;'RH'), array('empty' =&gt; '(Select)')) ), array('name'=&gt;'description', 'header'=&gt;'Description', 'filter'=&gt;CHtml::textField('Request[description]',$request-&gt;description)), array('name'=&gt;'status', 'header'=&gt;'Status', 'filter'=&gt;CHtml::textField('Request[status]',$request-&gt;status)), ), )); </code></pre> <p>Are there some things I miss?</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload