Following up on my previous question, I am supposedly passing the submitted post data as query strings like so:
echo $this->Form->create('Donor',array(
'url' => array_merge(array('action' =>'find'), $this->params['pass'])
));
But when I try the following within my controller's find
action :
$this->Paginator->settings['conditions'] = $this->Donor->parseCriteria($this->Prg->parsedParams());
The $this->Prg->parsedParams()
only consists of the criteria:
here's the var_dump
array (size=1)
'criteria' => string 'blood_group_id' (length=14)
And here is my view code :
<?php
echo $this->Form->create('Donor',array(
'url' => array_merge(array('action' =>'find'), $this->params['pass'])
));
echo $this->Form->input('criteria',array(
'label'=>'Search Criteria',
'options' => array(
'id'=> 'By ID',
'name' => 'By Name',
'blood_group_id' => 'By Blood Type',
'type' => 'By Donor Type',
'age' => 'By Age',
'gender' => 'By Gender'
)
));
?>
<?php echo $this->Form->input('query', array( 'id' => 'query', 'name' => 'query', 'label' => false, 'placeholder' => 'Search')); ?>
<?php echo $this->Form->end(__('Search'));?>
I believe that I should be receiving all submitted data and not only the criteria's value.. I do not know what is wrong, and frankly this is taking so much time to put together. I cant seem to figure out how to work with this plugin. Is it just me ? Please, if anyone could find the time to help out, I will be grateful!