terminal42 / contao-ajaxform

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

Version 1.1.0 #13

Closed Toflar closed 5 years ago

Toflar commented 5 years ago
Metis77 commented 5 years ago

Works great. Thank you!

Would it be possible to add some more information to the form itself. Like some classes or attributes: data-status="loading" and data-step="step1". This would allow us to add some nice design.

Also the current step in mod_mp_form_steps needs to be updated somehow.

Toflar commented 5 years ago

Also the current step in mod_mp_form_steps needs to be updated somehow.

That's not possible. Again, they don't know of each other at all.

Metis77 commented 5 years ago

hm I see. A class for the loading state would be perfect. I could solve the progress indication by adding {{mp_forms::1::percentage}}.

Toflar commented 5 years ago

A class for the loading state would be perfect.

Added, the form now contains a class ajax-loading during the request.

I could solve the progress indication by adding {{mp_forms::1::percentage}}.

Yeah that's one way of doing it. However, it won't work if you want to place the front end module somewhere completely different. For example in the right or left column. Which is also part of the issue: The fact that you can place it completely elsewhere means that they have no clue about each other. It would be possible to integrate something like that but it would need to be an mp_forms step module specific feature. It would need to reload itself in case the form is sent via ajax. Totally doable but not easy at all.

Metis77 commented 5 years ago

perfect, thank you!