hey Lepinski,

where are the options in this tableless model coming from? Are they
just hard coded into the model?

if so, i would set something up like this:

in your model:

class L extends AppModel {

        var $options = array(
                1 => 'Option 1',
                2 => 'Option 2',
                3 => 'Option 3'
        );

}

Then in your controller do this:

$this->set('options',$this->Mycontroller->MyTablelessModel->options);

Then in your view do this:

echo $form->select('MyModel.field_name',array('options'=>$options));

Let me know if that works for you

On Sep 2, 2:58 pm, villas <[EMAIL PROTECTED]> wrote:
> I suppose you already read the Book about the Form 
> Helper:http://book.cakephp.org/view/192/options-options
>
> Jonathan Snook's article also might help a 
> little:http://snook.ca/archives/cakephp/contact_form_cakephp/
>
> There's also good old HTML/PHP too :-)
>
> On Sep 2, 12:41 pm, LepinskiWA <[EMAIL PROTECTED]> wrote:
>
> > I am using a tableless model and I am having trouble trying to create
> > a select element (like scaffold does). Someone help me?
>
>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to