Welcome, Guest
Username: Password: Remember me

TOPIC: Determine initial question based on URL

Determine initial question based on URL 7 months 1 week ago #107568

  • Ronnos
  • Ronnos's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 7
  • Karma: 0
Hi,

I've made a survey where people can find answers about certain categories. My survey can be approached from an external site, redirecting to the survey URL. Now I want different starting questions for each external link. For example, on my website I want to have two URLS: urlX starts with question 5, and urlY starts with question 7 (where the present questions are automaticly prefilled in, as far as i can see it's only possible to prefill only one question).

In other words, I want to jump to a certain question on basis of the URL. Is it possible to add conditions based on URL?

Thank in advance
The administrator has disabled public write access.

Determine initial question based on URL 7 months 5 days ago #107725

  • tpartner
  • tpartner's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 4369
  • Thank you received: 828
  • Karma: 381
Is it possible to add conditions based on URL?
Not directly but you should be able to pre-fill a question with the URL and then use that question for conditions or relevance.


.
Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

LimeSurvey is open-source and run entirely by volunteers so please consider donating to support the project.
The administrator has disabled public write access.

Determine initial question based on URL 7 months 5 days ago #107759

  • Ronnos
  • Ronnos's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 7
  • Karma: 0
Thanks for your answer! I'm gonna try to build in prefilled questions. Meanwhile I found that it's possible to fill in multiple answers to questions with "&".
On first surveys page, i ask a few questions which will be prefilled with the URL. Those questions i'm gonna hide with CSS, so when the user clicks to next page, i won't see which questions are already filled in, and so i can redirect him to the correct page.

Thanks!
The administrator has disabled public write access.

Determine initial question based on URL 6 months 2 weeks ago #108304

  • Foram
  • Foram's Avatar
  • OFFLINE
  • Junior Lime
  • Posts: 24
  • Karma: 0
Hi Ronnos,

You said that "My survey can be approached from an external site, redirecting to the survey URL". I want to implement the same thing in my project.

Can you tell me how can I get the Survey Url (Note : I don't want to use email feature of LimeSurvey). I want to implement one email application from where I will send Survey Url

For implementing this feature, I need to know where the Survey Url is stored? It is stored in Database of LimeSurvey or is it generated by the PHP code of LimeSurvey ?
The administrator has disabled public write access.

Determine initial question based on URL 6 months 2 weeks ago #108318

  • DenisChenu
  • DenisChenu's Avatar
  • OFFLINE
  • Moderator Lime
  • Posts: 6551
  • Thank you received: 869
  • Karma: 257
PHP code generated.

It shown on Survey admin page
The administrator has disabled public write access.

Determine initial question based on URL 6 months 2 weeks ago #108323

  • Foram
  • Foram's Avatar
  • OFFLINE
  • Junior Lime
  • Posts: 24
  • Karma: 0
Okay Thanks. :)

it is generated based on survey id right ?

that means if my survey id is 1 and the server which is hosting my Limesurvey application is 10.10.10.10 then the url will be
"http://10.10.10.10/limesurvey/index.php/1/lang-en"
The administrator has disabled public write access.
Moderators: ITEd
Time to create page: 0.104 seconds
Donation Image