As the pr() output shows, the processed form data on POST
returns a devided array with the normal "Date" and a second "date"
resulting in 2 warnings (Undefined variable: month/year) + the form
process recognized as invalide.

Array
(
    [Date] => Array
        (
            [user_id] => 1
            [date_type_id] => 1
            [date] => Array
                (
                    [day] => 09
                )

            [details] =>
        )

    [date] => Array
        (
            [date] => Array
                (
                    [month] => 11
                    [year] => 2008
                )

        )

)

The Form was baked by the console

<?php echo $form->create('Date');?>
        <fieldset>
                <legend><?php __('Add Date');?></legend>
        <?php
                echo $form->input('user_id');
                echo $form->input('date_type_id');
                echo $form->input('date');
                echo $form->input('details');
        ?>
        </fieldset>
<?php echo $form->end('Submit');?>

I cant find the problem - the database field is of the normal "date"
type


Wow..
After changing it to the following, it worked...

        <?php
                echo $form->input('Date.user_id');
                echo $form->input('Date.date_type_id');
                echo $form->input('Date.date');
                echo $form->input('Date.details');
        ?>

So why is this neccessary if there is only that one model Date?
--~--~---------~--~----~------------~-------~--~----~
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