Re: Multiple AJAX Forms on same page all submitting to first form.
i had already fixed that issue since i posted this initially, and that wasn't the issue. I actually did get it working now, by switching to using $ajax-form, instead of $ajax-submit(). The downside is data validation doesn't work with $ajax-form, but at least the form tags are being generated properly. Thanks Guys. On May 12, 9:46 am, John Andersen j.andersen...@gmail.com wrote: As Nilz wrote, you have two keys with the name of id in your array! That can't work! So check you form create statement and correct it! Enjoy, John On May 12, 7:17 pm, Robert McWay mcway.web.developm...@gmail.com wrote: 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? [snip] 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
Re: Multiple AJAX Forms on same page all submitting to first form.
Are you calling $form-end()? On Thu, May 13, 2010 at 9:54 AM, Robert McWay mcway.web.developm...@gmail.com wrote: i had already fixed that issue since i posted this initially, and that wasn't the issue. I actually did get it working now, by switching to using $ajax-form, instead of $ajax-submit(). The downside is data validation doesn't work with $ajax-form, but at least the form tags are being generated properly. Thanks Guys. On May 12, 9:46 am, John Andersen j.andersen...@gmail.com wrote: As Nilz wrote, you have two keys with the name of id in your array! That can't work! So check you form create statement and correct it! Enjoy, John On May 12, 7:17 pm, Robert McWay mcway.web.developm...@gmail.com wrote: 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? [snip] 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.comcake-php%2bunsubscr...@googlegroups.comFor 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.comcake-php%2bunsubscr...@googlegroups.comFor more options, visit this group at http://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
Re: Multiple AJAX Forms on same page all submitting to first form.
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
Re: Multiple AJAX Forms on same page all submitting to first form.
As Nilz wrote, you have two keys with the name of id in your array! That can't work! So check you form create statement and correct it! Enjoy, John On May 12, 7:17 pm, Robert McWay mcway.web.developm...@gmail.com wrote: 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? [snip] 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
Re: Multiple AJAX Forms on same page all submitting to first form.
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 putting multiple ajax form 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.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
Re: Multiple AJAX Forms on same page all submitting to first form.
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 putting multiple ajax form 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.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 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
Multiple AJAX Forms on same page all submitting to first form.
Hello All, I am having trouble with putting multiple ajax form 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 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