On Feb 26, 3:36 am, vikas <[email protected]> wrote:
> <?php echo $form->input('religion_id',array('label'=>'','options' =>
> array($religions)));?>
>
> It gives me error: cant find $religions as it used here in element..
That line should not have $religions enclosed in another array. Also,
$religions should be set in the element. In one of my Cake projects, I
do something similar (from my controller):
$this->set('records', $findResults);
$this->render('/elements/RecordsFormat', 'plain'); // plain being the
name of the layout
Then the RecordsFormat element has access to $records.
How are you rendering your element? From the controller or from the
view?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---