I wouldn't use JS because you don't have access to Cakes functions. Furthermore, if you use a Helper you want have the Controllers functionality.
Its best to create a dummy action in the AppController, or use a Component. On Feb 12, 12:09 pm, "Greg S." <[email protected]> wrote: > Oh, yes, come to think about it, that makes sense... > > Maybe another workaround would be to generate some bit of javascript > that would intercept the submit event, and do a redirect with the > named parameters. > > I'm going to write a component or a helper that does that. > > What do you think? > > On Feb 12, 8:45 pm, Miles J <[email protected]> wrote: > > > Its impossible, that functionality is part of HTTP and your browser. > > > The work around is posting to another page, and having that page > > redirect with the named parameters. > > > I wrote a component that does this automatically, but I haven't really > > tested it in a > > while:http://github.com/milesj/data_kit/blob/master/controllers/components/... > > > On Feb 12, 11:37 am, "Greg S." <[email protected]> wrote: > > > > Hi guys, > > > > I have a simple form in my view. Currently, the form is posting the > > > data back to my controller. I would like to post the data to named > > > parameters instead. > > > > Say for example I have this : > > > > <?php > > > echo $form->create(false, array('action' => 'index')); > > > echo $form->input('search'); > > > echo $form->end('search'); > > > ?> > > > > How do I make this form load the > > > urlwww.example.com/controller/search:some+keywords > > > ? > > > > I've tried setting 'type'=>'get' in the $form->create options array, > > > but it will generate a ugly, old-fashioned url instead of using the > > > nice named parameters. > > > > Any ideas ? > > > > Thanks ! Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. 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
