- Posts: 19
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Is it possible to pass the URL fields into the URL of an iframe in survey?
- Qsgt
- Topic Author
- Offline
- New Member
Less
More
6 years 6 months ago #158675
by Qsgt
Is it possible to pass the URL fields into the URL of an iframe in survey? was created by Qsgt
Hi,
I have an iframe in the middle of one of my surveys that uses data collected at an earlier point in the survey (specifically Name and SAVEDID). I know that I can pass this data to an external script through URL fields in the end URL but can I can I pass the data into the URL of an iframe that appears part way through the survey?
Thanks in advance,
qsgt
I have an iframe in the middle of one of my surveys that uses data collected at an earlier point in the survey (specifically Name and SAVEDID). I know that I can pass this data to an external script through URL fields in the end URL but can I can I pass the data into the URL of an iframe that appears part way through the survey?
Thanks in advance,
qsgt
The topic has been locked.
- tpartner
- Away
- LimeSurvey Community Team
Less
More
- Posts: 10613
- Thank you received: 3691
6 years 6 months ago #158676
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic Is it possible to pass the URL fields into the URL of an iframe in survey?
Yes, you should be able to use the same placholders in the src attribute of the iframe tag. (assuming you have a <iframe src="xx"/> tag somewhere in the question text)
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
- Qsgt
- Topic Author
- Offline
- New Member
Less
More
- Posts: 19
- Thank you received: 0
6 years 6 months ago #158685
by Qsgt
Replied by Qsgt on topic Is it possible to pass the URL fields into the URL of an iframe in survey?
I tried using this as my iframe src "
form.jotform.co/63137860302854?name
[first]={name_first}&name[last]={name_last}®istrationNumber={SAVEDID}"
But it didn't work because the curly braces got percent encoded in the URL without replacing the variable names.
Should I be doing something differently?
qsgt
But it didn't work because the curly braces got percent encoded in the URL without replacing the variable names.
Should I be doing something differently?
qsgt
The topic has been locked.
- tpartner
- Away
- LimeSurvey Community Team
Less
More
- Posts: 10613
- Thank you received: 3691
6 years 6 months ago #158722
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic Is it possible to pass the URL fields into the URL of an iframe in survey?
I don't know how the braces would be encoded. Where did you place that URL and what LS version are you using?
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13912
- Thank you received: 2549
6 years 6 months ago #158732
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 Is it possible to pass the URL fields into the URL of an iframe in survey?
And what is this jotform ? Else : for url : it's more easy to do the url in an Equation question type.
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.
- tpartner
- Away
- LimeSurvey Community Team
Less
More
- Posts: 10613
- Thank you received: 3691
6 years 5 months ago #158789
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic Is it possible to pass the URL fields into the URL of an iframe in survey?
Yes, as Denis suggests, it may be easier to define the URL in a hidden (by question class) equation type question and reference that in your <iframe> tag.
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
- b1994mi
- Offline
- New Member
Less
More
- Posts: 18
- Thank you received: 4
5 years 10 months ago - 5 years 10 months ago #168560
by b1994mi
Replied by b1994mi on topic Is it possible to pass the URL fields into the URL of an iframe in survey?
Hi, I have a similar question. I have no experience in PHP programing, so every answer that I googled have different approach and neither that have implementation on Limesurvey.
What I am trying to do is to have a question that a user can pick drop down menu for an answer, then every time the user selects, the iframe google maps changes too. This is just to give the user extra clear explanation in what sub-district that he/she lives.
This is what the question would look like:
This is the code:
I would like to have the q=kebayoran+baru to be dynamic according to the drop down menu answer/selection.
Any ideas?
What I am trying to do is to have a question that a user can pick drop down menu for an answer, then every time the user selects, the iframe google maps changes too. This is just to give the user extra clear explanation in what sub-district that he/she lives.
This is what the question would look like:
This is the code:
Code:
<p><iframe frameborder="0" height="500" scrolling="no" src="https://www.google.com/maps/embed/v1/place?q=kebayoran+baru&amp;key=AIzaSyBFw0Qbyq9zTFTd-tUY6dZWTgaQzuU17R8" width="500"></iframe></p> <p> </p> <p>Where do you live?</p>
I would like to have the q=kebayoran+baru to be dynamic according to the drop down menu answer/selection.
Any ideas?
Attachments:
Last edit: 5 years 10 months ago by b1994mi.
The topic has been locked.