Nate

I dug a little deeper on the notices - again, not raising a ticket
because this relates to checkboxes and a notice from HtmlHelper (which
I guess will move to FormHelper at some point). Currently:

$form->create('User'); $form->input('my_checkbox');

renders OK, but

$form->create('User'); $form->input('UserProfile/my_checkbox');

now raises a php Notice 'Undefined index:  value' from cake/libs/view/
helpers/html.php, line 401

i.e. if the field does not belong to the form's model, the notice is
raised. Manually setting the 'value' option stops the notice, but is
probably not the right solution :)

HTH

~GreyCells

On Mar 16, 2:53 pm, "nate" <[EMAIL PROTECTED]> wrote:
> Oh, to further clarify, you don't need to specify *both* 'action' and
> 'url'.  Just use 'action' if you are only specifying a controller
> action, and going with the default options for the rest of the URL
> (i.e. controller).  Use 'url' if you are specifying a completely
> custom URL, i.e. '/your/form/action'.  Also remember that 'url' works
> with array-based URLs as well.
>
> On Mar 16, 10:23 am, "GreyCells" <[EMAIL PROTECTED]> wrote:
>
> > For those of us that are using/testing 1.2 bleeding edge, where you
> > used to specify:
>
> > $form->create('MyModel', array('action'=>'/your/form/action'));
>
> > You now need to specify:
>
> > $form->create('MyModel', array('action'=>'/your/form/action', 'url'=>'/
> > your/form/action'));
>
> > to stop your custom action being overwritten.
>
> > I think this change happened around r4617, so if all your custom
> > routes and auth suddenly fail, check this first :)
>
> > I've not created a ticket yet, because FormHelper appears to be
> > undergoing some major changes (as you would expect) & is also raising
> > a couple of php notices (for undefined 'id' and 'value'). If you'd
> > like a ticket, let me know.
>
> > ~GreyCells


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" 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