- Posts: 6
- Thank you received: 2
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Survey in iframe doesn't submit, only refreshes page
- FelixG
- Topic Author
- Offline
- New Member
Less
More
5 years 2 months ago - 5 years 2 months ago #178947
by FelixG
Survey in iframe doesn't submit, only refreshes page was created 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?
Any help is appreciated, thanks!
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 })
Any help is appreciated, thanks!
Last edit: 5 years 2 months ago by FelixG.
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13935
- Thank you received: 2551
5 years 2 months ago #178975
by DenisChenu
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.
Replied by DenisChenu on topic Survey in iframe doesn't submit, only refreshes page
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.
- FelixG
- Topic Author
- Offline
- New Member
Less
More
- Posts: 6
- Thank you received: 2
5 years 2 months ago #178981
by FelixG
Replied by FelixG on topic Survey in iframe doesn't submit, only refreshes page
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.
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.
- FelixG
- Topic Author
- Offline
- New Member
Less
More
- Posts: 6
- Thank you received: 2
5 years 2 months ago - 5 years 2 months ago #178984
by FelixG
Replied by FelixG on topic Survey in iframe doesn't submit, only refreshes page
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 years 2 months ago by FelixG.
The following user(s) said Thank You: DenisChenu
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13935
- Thank you received: 2551
5 years 2 months ago #178987
by DenisChenu
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.
Replied by DenisChenu on topic Survey in iframe doesn't submit, only refreshes page
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.
- FelixG
- Topic Author
- Offline
- New Member
Less
More
- Posts: 6
- Thank you received: 2
5 years 2 months ago - 5 years 2 months ago #178998
by FelixG
Replied by FelixG on topic Survey in iframe doesn't submit, only refreshes page
Thanks, do you know how to turn off the session cookie? I managed with the other ones..
Last edit: 5 years 2 months ago by FelixG.
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13935
- Thank you received: 2551
5 years 2 months ago #178999
by DenisChenu
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.
Replied by DenisChenu on topic Survey in iframe doesn't submit, only refreshes page
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.
- FelixG
- Topic Author
- Offline
- New Member
Less
More
- Posts: 6
- Thank you received: 2
5 years 2 months ago - 5 years 2 months ago #179000
by FelixG
Replied by FelixG on topic Survey in iframe doesn't submit, only refreshes page
Oh I misread your message, understood now, thanks.
Last edit: 5 years 2 months ago by FelixG.
The topic has been locked.