If you are not using Cake to process the form why use FormHelper when
a good old hand-coded form in HTML works.

To me Helpers are great time savers when you are utilizing the
frameworks features: validations, auto read/write values to view,
posting to the next action in your controller. If your not using the
built features of cake for a form the helpers could slow down your
performance compared to hard-coded HTML that does not need processing.

Does anyone else agree with this opinion?

-Buddy

On May 15, 4:52 am, Marcelius <[EMAIL PROTECTED]> wrote:
> Hi!
>
> The situation:
> //in some view I have:
> <?php
> echo $form->create(array("controller"=>"search", "action"=>"index"));
> echo $form->input("Region.region_name");
> echo $form->end();
> ?>
>
> Straight forward, nothing to it... Now I want to post data via GET.
> Cake doesn't have to worry about handling the 'posted' data because
> that is delegated to another 3th party class that does the magic for
> me.
>
> //like so:
> <?php
> echo $form->create(array("controller"=>"search", "action"=>"index",
> "type"=>"get"));
> echo $form->input("Region.region_name");
> echo $form->end();
> ?>
>
> But here comes the problem, the input name isn't "data[Region]
> [region_name]" anymore, but "region_name". So apparently the form
> helper notices the difference in the form method, and changes the way
> the input names are printed. Wy? In this situation it is for example
> impossible to create an array of checkboxes and post them as array
> data because input names with "data[Option][1][option_title]" and
> "data[Option][2][option_title]" etc are converted to "option_title"
> only.
>
> "Okay so don't be lazy and print the html yourself". Thats fine with
> me to, but it would be great to have Cake support this problem. Or
> does it and do I miss something?
>
> Greets,
> Marcel.

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

Reply via email to