← Back to Flexi Contact Support
I am having some difficulty getting the plugin to work. I get the message:
AJAX handler 'contactForm::onMailSent' was not found.
When trying to submit the form. I have framework in the layout and contactForm in the partial.
Last updated
I have got the same Issue, if I put the contact form in one of the Partials. If there a way to solve this ??
Last updated
I believe this is a limitation of octobercms and not that of the plugin. Have a look at this guide to help better explain http://octobercms.com/docs/cms/partials#dynamic-partials. Hope this helps.
To fix this you can replace component from partial to layout. In the partial you should place markup of contact form (like in "Custom markup" docs section)
Same here. Finally move all components and {% component "contactForm" %} to page level, everything works fine.
I GOT THE SOLUTION!!
Just put the settings generated by the Magic Forms plugin like this:
[viewBag]
[genericForm contactForm] rules[name] = "required" rules[email] = "required|email" rules[message] = "required" rules[tel] = "required".... etc
Into the page where the partial is injected like this {% partial 'sections/contact' %} Then you will avaible to inject the component "contactForm" (in my case, of course) into the partial 'sections/contact' like this {% component "contactForm" %}
REMEMBER to include {% framework extras %} into the layout before jQuery scrtipt to enable the ajax handler.
That's it!
1-8 of 8