Set a default survey, skip Survey List page

More
4 years 2 months ago #93727 by jonsen
jonsen created the topic: Set a default survey, skip Survey List page
Dear limesurvey community,

I would like to skip the Survey List page and forward directly to a default survey. Hardcoding the GET variable in the index.php led to faulty behaviour (solved in another thread). What is the correct way to do it?

What I don't get: Why is the Survey List even diplayed at all when there is only one survey?

Best
Jonsen

Please Log in to join the conversation.

More
4 years 2 months ago - 4 years 2 months ago #93735 by jonsen
jonsen replied the topic: Set a default survey, skip Survey List page

holch wrote: to skip the welcome page LS has an option in the interface now, as far as I recall. And the redirect I would make with .htaccess.


Thank you. I will wait for other posts, but probably it will be a .htaccess-based solution. The option in the interface is in v2.0? This survey is my last one on 1.92+...
Last Edit: 4 years 2 months ago by jonsen.

Please Log in to join the conversation.

More
4 years 2 months ago #93737 by holch
holch replied the topic: Set a default survey, skip Survey List page
I think this was also available in 1.92, but I am not 100%. I'll start localhost and check in 2.0 where to find. But if it is there, I am quite sure that it exists quite a while (pre 2.0).

I'm not a LimeSurvey GmbH member. I answer at the LimeSurvey forum in my spare time. No support via private message.
Some helpful links: Manual (EN) | Question Types | Workarounds

Please Log in to join the conversation.

More
4 years 2 months ago #93738 by holch
holch replied the topic: Set a default survey, skip Survey List page
Somehow my local webserver won't start...

But here, this should clarify:
docs.limesurvey.org/Workarounds%3A+Manip...ing_the_welcome_page

This option is availabe since 1.91, so quite a while now.

I'm not a LimeSurvey GmbH member. I answer at the LimeSurvey forum in my spare time. No support via private message.
Some helpful links: Manual (EN) | Question Types | Workarounds
The following user(s) said Thank You: jonsen

Please Log in to join the conversation.

More
4 years 2 months ago #93740 by jonsen
jonsen replied the topic: Set a default survey, skip Survey List page
Thank you for your help holch!

But that option is only available for the "welcome" page within a survey, not for the "survey list" page which is shown when lime is called without a survey id in the URL.

As the "survey list" doesn't have a "submit" button, the Javascript/jQuery-Approach in the workaround section can't be adapted for this.

I will try the .htaccess approach now and post my results here.

Best
Jonsen

Please Log in to join the conversation.

More
4 years 2 months ago #93741 by holch
holch replied the topic: Set a default survey, skip Survey List page
Well, when you said that you went directly to the survey, skipping the welcome page, I assumed that you talk about the welcome page in the survey and not about the survey list page.

I thought you would be redirecting from the survey list page to the survey and then skip the welcome page of the survey, while in reality you only wanted to redirect fromt he survey list page to the actual survey.

so the problem is actually a lot easier. This is definitely a job for .htaccess.

I'm not a LimeSurvey GmbH member. I answer at the LimeSurvey forum in my spare time. No support via private message.
Some helpful links: Manual (EN) | Question Types | Workarounds

Please Log in to join the conversation.

More
4 years 2 months ago #93742 by jonsen
jonsen replied the topic: Set a default survey, skip Survey List page

holch wrote: Well, when you said that you went directly to the survey, skipping the welcome page, I assumed that you talk about the welcome page in the survey and not about the survey list page.


Yes, sorry, i misused the "welcome page" term in the other thread...

L8or

Please Log in to join the conversation.

More
4 years 2 months ago #93794 by DenisChenu
DenisChenu replied the topic: Set a default survey, skip Survey List page
Hello,

Can be an idea for "Plugin system" : www.limesurvey.org/fr/forum/news/92759-y...s-for-limesurvey-205

But you can do it in javascript,
- Set the defult template in General settings to your own template
- Edit surveylist.pstpl and replace with:
<script type="text/javascript">
<!--
window.location.replace("http://example.com/index.php/XXXXXX");
//-->
</script>
<noscript><a href="http://example.com/index.php/XXXXXX">Go to the survey</a></noscript>
example.com/index.php/XXXXXX add to becopy/pasted from Survey URL in LS admin.

Denis

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand (or search sondages pro).
An error happen ? Before make a new topic : remind the Debug mode .
The following user(s) said Thank You: jonsen

Please Log in to join the conversation.

More
4 years 2 months ago - 4 years 2 months ago #93806 by jonsen
jonsen replied the topic: Set a default survey, skip Survey List page
Thank you, Denis, that works very nicely!

For anyone interested, the code for LimeSurvey < v2.0 is a little different, because it doesn't have the fancy URLs, also I added a little more info in <noscript>:
<script type="text/javascript">
	<!--
	window.location.replace("https://example.com/index.php?sid=99184"); 
	//--> 
</script>
<noscript>
	Javascript seems to be deactivated.<br />
	Please allow Javascript for the domain example.com to answer this survey.<br />
	<br />
	<a href="https://example.com/index.php?sid=99184">Click here</a>
	to get to the survey.
</noscript>

Best
Jonsen
Last Edit: 4 years 2 months ago by jonsen.

Please Log in to join the conversation.

More
4 years 2 months ago #93807 by DenisChenu
DenisChenu replied the topic: Set a default survey, skip Survey List page

jonsen wrote: For anyone interested, the code for LimeSurvey < v2.0 is a little different,

example.com/index.php/XXXXXX add to becopy/pasted from Survey URL in LS admin.

;)

You're welcome :-)

If our hints have been helpful and you enjoy limesurvey please consider a donation to give Limesurvey a future .
We do all this in our free time and you don't have to pay a penny for this software.

Without your help we can't keep this project alive.


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

Please Log in to join the conversation.

More
4 years 2 months ago #93808 by jonsen
jonsen replied the topic: Set a default survey, skip Survey List page

If our hints have been helpful and you enjoy limesurvey please consider a donation to give Limesurvey a future .
We do all this in our free time and you don't have to pay a penny for this software.


For most of my LS projects, my employer is public, so donations aren't possible. But maybe we can figure something out, I will PM you.

For this private project, I will donate soon...

Thanks again, Denis! TOPIC RESOLVED

Best
Jonsen

Please Log in to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now