Sunday, December 30, 2012

Re: Submit separably triggered form parts at once

On Sat, Dec 29, 2012 at 5:44 PM, Yousg27 <yous.g27@gmail.com> wrote:
>
> The problem is that when I trigger several of the hidden parts I can submit
> them all to the data base at once.

You can, or cannot?

> each of them was triggered at a different
> time and it has its own save button.

When you load the new form elements, don't wrap them in their own form
tags. Just add the elements themselves.

If the elements you're adding are always the same -- that is, they do
not depend on what has already been filled in by the user -- you could
just load them elsewhere on the page and hide them, then move them
inside the form and reveal them. Then you won't need to use AJAX.

--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

---
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.
Visit this group at http://groups.google.com/group/cake-php?hl=en.

No comments: