I took another look at the generated HTML, like you suggested Matt,
and found something very strange. The multiple forms i have on this
page are being generated by a loop. It appears that the first form
generates the proper opening and closing form tags, along with the
javascript for the AJAX. But then looking at the 2nd and 3rd forms in
the code, i realized that the opening form tag is not being inserted,
as well as the closing form tag, The submit button and proper
javascript are still being generated, but for some reason the form
tags just don't generate past the first form. Any idea why?

On May 7, 8:19 am, Matthew Powell <php...@gmail.com> wrote:
> Take a look at the generated HTML.  It sounds very much like the first
> form isn't being terminated properly (no </form> tag).  This causes
> the fields in the second form to think they are part of the first
> form.
>
>
>
>
>
> On Thu, May 6, 2010 at 22:45, Nilz <nilzer...@gmail.com> wrote:
>
> > Why are you using two ids?
>
> > <?php echo $form->create('User', array('action'=>'check', 'id'=>
> > $formid, 'name'=>$formid, 'id' => $submitid)); ?>
>
> > I use $ajax->form to work this fine for me.
>
> > Hope it help.
>
> > On May 7, 2:10 am, Robert McWay <mcway.web.developm...@gmail.com>
> > wrote:
> >> Hello All,
>
> >> I am having trouble with puttingmultipleajaxform instances on the
> >> same page. All the forms have the same fields, with the exception of a
> >> hidden field passing the User Id. Upon submitting the form, it always
> >> submits the form fields in the first form, regardless of which form i
> >> submit. I have given  the each submit, and form unique ids, but it
> >> still seems to always submit that first form. Here is an example of a
> >> couple forms:
>
> >> <?php
> >> $update = 'availability'.$t['id'];
> >> $formid = 'a'.$t['id'];
> >> $submitid = 'submit'.$t['id'];
> >> ?>
> >> <?php echo $form->create('User', array('action'=>'check', 'id'=>
> >> $formid, 'name'=>$formid, 'id' => $submitid)); ?>
> >> <?php echo $form->hidden('tutor_id.'.$t['id'], array('value'=>
> >> $t['id']))?>
> >> ...more identical form checkbox fields
>
> >> <?php echo $ajax->submit('Check', array('url'=>
> >> array('controller'=>'users', 'action'=>'check'), 'update' => $update,
> >> 'id' => $submitid)); ?>
>
> >> Any ideas?
>
> >> Check out the new CakePHP Questions sitehttp://cakeqs.organdhelp 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 cake-php@googlegroups.com
> >> To unsubscribe from this group, send email to
> >> cake-php+unsubscr...@googlegroups.com For more options, visit this group 
> >> athttp://groups.google.com/group/cake-php?hl=en
>
> > Check out the new CakePHP Questions sitehttp://cakeqs.organd 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 cake-php@googlegroups.com
> > To unsubscribe from this group, send email to
> > cake-php+unsubscr...@googlegroups.com For more options, visit this group 
> > athttp://groups.google.com/group/cake-php?hl=en
>
> Check out the new CakePHP Questions sitehttp://cakeqs.organd 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 cake-php@googlegroups.com
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group 
> athttp://groups.google.com/group/cake-php?hl=en

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 cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

Reply via email to