My view look like the following :
<div id="property">
<?php
echo $form->create('property', array('action' => 'findzip'));
echo $form->input('Zip Code');
echo $form->submit();
echo $form->end();
?>
</div>
<?php foreach ($foundProperties as $property): ?>
<?php echo $this->element('property', array('property' =>
$property)); ?>
<?php endforeach; ?>
my function in the controller looks like :
function findzip()
{
if (!empty($this->data)) {
$conditions = array("Property.zip" => $this->data);
$foundProperties = $this->Property->findall
($conditions);
$this->set(compact('foundProperties'));}
}
all I want to do is return the properties that have the zip code sent
by the form. I've been working on it for
two days and I'm at my wits end.
Rich
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---
No comments:
Post a Comment