Saturday, February 28, 2009

Re: Submit several forms with a button

This actually might work, thanks to all for your advices, they give
direction =].

Regards from Mexico


On 27 feb, 06:12, Stinkbug <justink...@gmail.com> wrote:
> So let's think about this.  Is your client just worried about how the
> form looks (3 buttons and 1submitall button)?  Technically, if there
> is no reason to have 3 separateforms, don't create 3 separateforms,
> unless the client requirement is calling the programming shots too.
> It's possible you could have one form but still have 4 different
> buttons, achieving the same effect.  Any of the buttons do the same
> thing...  submitall the data to the server... and then you can do
> whatever you want with it...  whether it be only using part of it or
> all of it.
>
> Then your satisfying the client requirement for the look of the form.
> If that's what they're really worried about.
>
> On Feb 26, 1:30 pm, keogh <keog...@gmail.com> wrote:
>
> > @scs Yes, it's necessary to have the 3formsseparately and onesubmit
> > all button =S, it's the client requirements, you know how strict they
> > are =S.
>
> > @brian that could be usefully, thanks.
>
> > If anybody could suggest anything else, I'll appreciate it.
>
> > Thanks
>
> > On 26 feb, 12:07, scs <scs2...@gmail.com> wrote:
>
> > > I s there any reason you need this a seprateformsand not just use
> > > one form?
>
> > > On Feb 26, 1:35 pm, brian <bally.z...@gmail.com> wrote:
>
> > > > You need to add a javascript onclick handler for the button that would
> > > > thensubmiteach form asynchronously. There are a number of ways to do
> > > > this, including serialising the data from each form and posting
> > > > separately, or using jquery's form plugin, for instance.
>
> > > > As for how you'll "call the view" I'm not sure, what you mean. Each
> > > > controller action will have its own view. But, since you'll need to
> > > > use AJAX in order tosubmit3formssimultaneously, you can simply
> > > > update the current page with the output from each of the actions. I
> > > > suppose Cake's AjaxHelper could take care of pretty much all of the
> > > > heavy lifting for you, but I don't use it so I can't give you any more
> > > > direction than that.
>
> > > > On Thu, Feb 26, 2009 at 12:22 PM, keogh <keog...@gmail.com> wrote:
>
> > > > > Hi,
>
> > > > > I have 3 separatelyformsin the same view, each with its ownsubmit
> > > > > button, what I want is to put one button that submits all the 3forms
> > > > > to its respectively controllers then I call the view where the 3forms
> > > > > are. Is there a way to do this with CakePHP? Is there any advice that
> > > > > you can give me?
>
> > > > > Any suggest and/or advice will be appreciate. Thanks in advance
>
> > > > > Regards,
--~--~---------~--~----~------------~-------~--~----~
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 cake-php+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

No comments: