My survey is embedded as an iframe and works fine on Desktop, but on mobile the Submit button will refresh the page and submit an empty answer - often twice. Does anyone have had this problem before?
I tried to prevent the submit in code like below, but it seems the trigger('click') is the only way to submit and that has the same effect. Is there another way to trigger the submit?
Code:
$(document).on('click', '#ls-button-submit', function (e) {
e.preventDefault();
console.log("submit");
$('#ls-button-submit').trigger('click'); // doesn't work on mobile when in iframe
})
Can you try disable ajax mode and see what happen ?
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member. -
Professional support
-
Plugins, theme and development
. I don't answer to private message.
Hey, thanks for the reply!
When disabling Ajax mode clicking submit will give an error page back, saying the session might have ended or I disabled cookies. Hm.
It seems it might be a problem with the iframe and some security block, because the website and the iframe are on different origins. I don't know how to fix this yet though. It only happens when in an iframe and on iPhone.
Yes iphone disable ALL cookies inside iframe : even session cookie …
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member. -
Professional support
-
Plugins, theme and development
. I don't answer to private message.
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member. -
Professional support
-
Plugins, theme and development
. I don't answer to private message.