report.view.php
<input id="inactive" type="number" value="5" min="1" max="1000" step="1"/>
<button type="submit" class="btn btn-success"><i class="fa fa-search"></i></button>
I want to use that input value to make a comparison in query. For example:
use \koolreport\inputs\Bindable;
use \koolreport\inputs\POSTBinding;
protected function defaultParamValues()
{
return array(
"inactive"=>5,
);
}
protected function bindParamsToInputs()
{
return array(
"inactive",
);
}
-..........................
- ..........................
function setup()
{
SELECT .........and( (
u.dt_last_login is null
or
datediff(curdate(), u.dt_last_login) > :days)// :days is the input read
order by inactive_days desc, s.code")->params(array( ":days"=>$this->params["inactive"],))
->pipe($this->dataStore('user_details'));
:days does'nt get the input value. I tried var_dump($_post). It is returning an empty array. $this->params["inactive"]=5, which is the value initiallised.What could be wrong?