Sorry AD, you've totally lost me. -- Baz L Web Development 2.0: Web Design, CakePHP, Javascript http://www.WebDevelopment2.com/
On Dec 5, 2007 5:09 AM, AD7six <[EMAIL PROTECTED]> wrote: > > > > On Dec 5, 8:57 am, Baz <[EMAIL PROTECTED]> wrote: > > OK, > > > > I've banged my head against the wall a million times. This is my > problem: > > > > I got date and time fields which I need. They are not associated with > the > > model or database. > > > > I call them like so: > > > > echo $form->input('from', array('label' => 'From', 'type' => > 'date', > > 'div' => 'date')); > > echo $form->input('to', array('label' => 'To', 'type' => 'date', > > 'div' => 'date')); > > echo $form->input('time', array('label' => 'Time', 'type' => > 'time', > > 'div' => 'date')); > > > > However, cleanUpFields doesn't work it's magic like if those fields were > in > > the database. > > > > Any ideas? > > Is there a way to force the model to consider those fields as its own? > > As things move quite fast, it depends on your cake revision. As of > right now override the schema method, call the parent and then add an > entry for your virtual field. > > https://trac.cakephp.org/browser/branches/1.2.x.x/cake/libs/model/model.php#L871 > > Although it doesn't make a lot of sense to override schema for a model > that /does/ have a table. you'd normally do so only for a model with > no table, such as the model for validation a contact message, so that > forms work etc. > > hth, > > AD > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com 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 -~----------~----~----~----~------~----~------~--~---