Survey in iframe doesn't submit, only refreshes page

More
5 months 1 week ago - 5 months 1 week ago #178947 by FelixG
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?
$(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
})

Any help is appreciated, thanks!
Last edit: 5 months 1 week ago by FelixG.

Please Log in or Create an account to join the conversation.

LimeSurvey Partners
More
5 months 1 week ago #178975 by DenisChenu
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 service on demand .
An error happen ? Before make a new topic : remind the Debug mode .

Please Log in or Create an account to join the conversation.

More
5 months 1 week ago #178981 by FelixG
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.

Please Log in or Create an account to join the conversation.

More
5 months 1 week ago - 5 months 1 week ago #178984 by FelixG
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.
Last edit: 5 months 1 week ago by FelixG.
The following user(s) said Thank You: DenisChenu

Please Log in or Create an account to join the conversation.

More
5 months 1 week ago #178987 by DenisChenu
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 service on demand .
An error happen ? Before make a new topic : remind the Debug mode .

Please Log in or Create an account to join the conversation.

More
5 months 1 week ago - 5 months 1 week ago #178998 by FelixG
Thanks, do you know how to turn off the session cookie? I managed with the other ones..
Last edit: 5 months 1 week ago by FelixG.

Please Log in or Create an account to join the conversation.

More
5 months 1 week ago #178999 by DenisChenu
We NEED session cookie … i's a iphone issue

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand .
An error happen ? Before make a new topic : remind the Debug mode .

Please Log in or Create an account to join the conversation.

More
5 months 1 week ago - 5 months 1 week ago #179000 by FelixG
Oh I misread your message, understood now, thanks.
Last edit: 5 months 1 week ago by FelixG.

Please Log in or Create an account to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now
Join our Newsletter!