Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple forms on page not working after upgrading #100

Closed
mikegomy opened this issue Aug 24, 2016 · 6 comments
Closed

Multiple forms on page not working after upgrading #100

mikegomy opened this issue Aug 24, 2016 · 6 comments

Comments

@mikegomy
Copy link

Hi,
I have upgraded to Modx 2.5.1-pl in the last few days. (Not sure if I should report this here or to Modx) Multiple forms on the page worked fine before then. Now the submit buttons no longer work.

I simplified the problem to use just one form on the page. The form definition starts with [[!FormIt? &submitVar=abc ...other stuff.... ]]
The submit button has a name="abc" id="abc" settings.

When I remove the &submitVar=abc (but keep the name="abc" id="abc" ) it works as expected. But when I use &submitVar=abc (as I will for multiple forms) it stops working.

Is there anything new that has to be done for Modx 2.5.1-pl?

Regards,
Mike

@funkyduke
Copy link

Is your submit a button or an input field? It must be an input field with type="submit" to work properly with &submitVar I think.

@joeke
Copy link

joeke commented Sep 25, 2016

@mikegomy It could have something to do with the update in processing of placeholders in the latest MODX version. We've had some strange behaviour as well in 2.5.1 with FormIt. Setting all the FormIt placeholders to uncached [[!+fi.placeholder]] solved the issues for us. Maybe that could work for you too?

@kargaved
Copy link

kargaved commented Nov 16, 2016

I had the same problem with Multiple forms + ajax, but it's was decided simple:
You should to insert to &submitVar the name of hidden field of the form, and not the form submit input name, for example:

<form method="post" action="[[~[[*id]]]]" id="questionForm" data-pjax> <input name="formid1" type="hidden" value="questionForm">

@Waivor
Copy link

Waivor commented Mar 4, 2017

@joeke I'm using two FormIt calls (Modx 2.5.5.) with input fields and the correct &submitVar values. Everything runs as expected without a recaptcha or math hook . But if you use recaptcha v.1 (which doesn't work at all) or the math hook in both calls it won't work ("Wrong answer" error).

@joeke
Copy link

joeke commented Sep 5, 2017

@mikegomy Is this still an active issue or did you resolve it?

@mikegomy
Copy link
Author

mikegomy commented Sep 5, 2017 via email

@joeke joeke closed this as completed Sep 5, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants