I have a simple element:
site_search.ctp:
<?php echo $form->create("Search") ?>
<?php echo $form->inputs() ?>
<?php echo $form->end("Search") ?>
Model Search is a tableless model which I manually create the schema
for:
search.php:
class Search extends AppModel {
var $useTable = false;
var $_schema = array(
"search_for"=>array(
"type"=>"string",
"length"=>128
)
);
}
Problem: The inputs() call in the element is coming back blank. It
works fine if I point the form at a model (ie. it generates the
inputs) with a real database table behind it, but not for one with a
$_schema.
I tried adding:
App:Imort("model", "Search");
to the element, but that didn't help.
How do I get an element to 'see' a model in this way?
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---