Hi guys

thanks you all for this information. Finally I think I'll move forward with
this line:

<? echo $form->input('', array('label' => 'URL', 'id' => '', 'name' =>
'data[Blogurl][url][]')); ?>

Anyway I need to check how it works once it's POSTed.


If this succeeds OK I'll send you the relevant part of the view; but surely
won't work with the saveAll method. Probably I'll write a custom method in
the Blog model to save URLs.

Thanks again!




Nicolás Andrade
*[email protected]*
 Blog <http://www.nicoandra.com.ar> | CV <http://nandrade.awardspace.com> |
Flickr <http://www.flickr.com/photos/aanm> |
Del.icio.us<http://del.icio.us/nis_>|
LastFM <http://www.lastfm.es/user/nis_>



On Sun, Aug 30, 2009 at 6:21 AM, WebbedIT <[email protected]> wrote:

>
> You may want to check the naming of your fields ... if you plan to use
> the saveAll() method they need to be as follows:
>
> echo $form->input('Blogurl.0.url', array('label' => 'Other URL'));
> echo $form->input('Blogurl.1.url', array('label' => 'Other URL'));
> echo $form->input('Blogurl.2.url', array('label' => 'Other URL'));
>
> which will create the required data array of
>
> Array
> (
>     [Blogurl] => Array(
>                 [0] => Array
>                        (
>                            [url] => http://www.url1.com
>                        )
>                [1] => Array
>                        (
>                            [url] => http://www.url2.com
>                        )
>                )
> )
>
> See:http://book.cakephp.org/view/75/Saving-Your-Data
> >
>

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