Survey in iframe doesn't submit, only refreshes page

More
1 year 6 months ago - 1 year 6 months 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: 1 year 6 months ago by FelixG.
The topic has been locked.
LimeSurvey Partners
More
1 year 6 months 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 , plugin development . I don't answer to private message.
The topic has been locked.
More
1 year 6 months 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.
The topic has been locked.
More
1 year 6 months ago - 1 year 6 months 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: 1 year 6 months ago by FelixG.
The following user(s) said Thank You: DenisChenu
The topic has been locked.
More
1 year 6 months 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 , plugin development . I don't answer to private message.
The topic has been locked.
More
1 year 6 months ago - 1 year 6 months ago #178998 by FelixG
Thanks, do you know how to turn off the session cookie? I managed with the other ones..
Last edit: 1 year 6 months ago by FelixG.
The topic has been locked.
More
1 year 6 months 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 , plugin development . I don't answer to private message.
The topic has been locked.
More
1 year 6 months ago - 1 year 6 months ago #179000 by FelixG
Oh I misread your message, understood now, thanks.
Last edit: 1 year 6 months ago by FelixG.
The topic has been locked.

Start now!

Just create your account and start using Limesurvey today.

Register now