I'm not sure what the problem might be but, normally, you'd have a
column called "created" and no form element(s). Cake will set the
value itself. To do that your your table schema should have the
following:

    created DATETIME DEFAULT NULL,
    modified DATETIME DEFAULT NULL

I guess for something like logins, the modified column is unnecessary, though.

On Thu, Mar 19, 2009 at 11:27 AM, GrantB <[email protected]> wrote:
>
> I just created my first CakePHP app and I'm running into a snag.
>
> I have a table "logins" with a datetime field.  I've baked the MVCs
> with no outward signs of trouble.  In the scaffolded add view, my date
> is a series of dropdowns with the current date/time preselected.
>
> When I submit, Cake always gives me "This field cannot be left blank"
> for this field.  It doesn't matter if I alter the preset values or
> not.  Cake always thinks this is blank, and I'm not sure what to do
> about it.
>
> The validation array in the model is:
>        var $validate = array(
>                'username' => array('notempty'),
>                'password' => array('notempty'),
>                'creationDate' => array('date')
>        );
>
> The model and view involved here is completely 100% generated.  I have
> not done any customization at all.
>
> Any help would be greatly appreciated.  Thanks.
> >
>

--~--~---------~--~----~------------~-------~--~----~
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