- This topic has 8 replies, 3 voices, and was last updated 6 months, 1 week ago by .
I cannot submit front-end form which is embedded within an iframe.
(I have a central website storing form submissions and an iframe with the form on multiple dependent sites. I use almost empty template doing the shortcode inside)
It concerns both normal and Ajax forms. I’m pretty sure it worked some time in the past.
First I suspected that the issue may be connected with cross-site security policy applied this year in browsers but I couldn’t confirm it.
Idea: what about setting session cookie in MBFS with secure param when https?
session_set_cookie_params('3600', 'mydomain.com', (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off')? true : false, true);
Well it overcame some console warnings about cookie security, but did not fix submission.
Also, when the form is set to Ajax and I look at the Chrome console it shows an error:
frontend-submission.js?ver=3.0.0:1 Uncaught TypeError: Cannot read property 'message' of undefined at Object.<anonymous> (frontend-submission.js?ver=3.0.0:1) at i (jquery.js?ver=1.12.4-wp:2) at Object.fireWith [as resolveWith] (jquery.js?ver=1.12.4-wp:2) at x (jquery.js?ver=1.12.4-wp:4) at XMLHttpRequest.c (jquery.js?ver=1.12.4-wp:4)
marking the part
m(a.data.messageas the point where bug occurs.
The same form accessed directly (not within an iframe) works perfectly.
Could you test your plugin in such use case?
- You must be logged in to reply to this topic.