terminal42 / contao-ajaxform

Submit a form through ajax and display error or confirmation message.
14 stars 7 forks source link

In combination with mp_forms unable to continue after step 2 #28

Closed lukasbableck closed 4 months ago

lukasbableck commented 1 year ago

Somehow it seems that I am unable to continue to step 3 no matter if I have mandatory fields or not. It always returns to step 1 and shows the error message "This field must not be empty!". I don't really know how to explain it better, but I have a minimal example that should make the problem pretty clear. Also I have attached a screenrecording. https://test.bableck.dev/ This problem does not occur if I use the default form content element, only in combination with ajaxform.

I can provide access to the installation if needed.

Contao 4.13.32 PHP 8.2.11 Ajaxform 1.3.0 MP_Forms 5.0.3

https://github.com/terminal42/contao-ajaxform/assets/42083846/17176022-d9dc-4bcc-b7fa-f18617757ab1

aschempp commented 11 months ago

do your fields on the multiple mp_form pages have different names?

Also be aware that this extension is basically end-of-life, since this feature has been integrated into Contao 5. It would be interesting to see if it works there though 🙃

lukasbableck commented 11 months ago

Yes, the fields have different names. I have tried it with the Contao 5 implementation in the mean time, it also doesn't work there, so maybe an error in my_forms after all? It seems that this change fixes the issue in Contao 5, idk if this really is the best solution for that, probably not, but at least the forms on our customers websites are working again for now.

aschempp commented 11 months ago

that looks like a valid fix, please open an issue for this in contao/contao and we'll see what the core developers think.

lukasbableck commented 11 months ago

Just did. IMO this change should also be made to this extension then. A lot of users are still on Contao 4.13 and would be affected by this. This commit fixed the problem for me on a 4.13 installation.

qzminski commented 4 months ago

Should be fixed in version 1.3.1. See 9159606a633350d063ebf8db3ccdd08eab8fe0f9