how to show "survey page loading message" after Token is entered?

More
1 month 2 weeks ago - 1 month 2 weeks ago #158320 by MadhuraBL
MadhuraBL created the topic: how to show "survey page loading message" after Token is entered?
Hi, I have a very lengthy survey with all questions in one page. I wanted a custom URL (example.com/survey-one.html) for my survey. So I have created a html file 'survey-one.html' inside limesurvey folder which contains <frameset> that loads the survey.
Please find screenshot attached for the .html code


Now, when I load example.com/survey-one.html token page is loaded. When I enter the token and submit, it takes too much time (like 30secs+) to load the survey. And since its in a <frame>, browser's page loading status bar (refer screenshot) is not shown while loading the survey page, which is confusing my participants and are complaining that the survey is not loading after token entered. Also, they are submitting token multiple times until page is loaded, and is causing duplicate empty entries in responses table.

How do I fix this? I am planning to add a javascript alert message in token page, that says "page loading, please wait" when token is submitted. How do I do this part? I tried adding some alerts in my custom template's template.js
But does not work, no alert pops-up in token page, it does pop up in survey page though!

Please help
Thanks in advance
Attachments:
Last Edit: 1 month 2 weeks ago by DenisChenu. Reason: Usage of example.(com|org) please

Please Log in to join the conversation.

More
1 month 2 weeks ago #158321 by DenisChenu
DenisChenu replied the topic: how to show "survey page loading message" after Token is entered?
Think it better (and easy too) to do it in PHP with php redirect
<?php
  header('Location: /index.php/1234');
  exit();
?>

Or update htaccess and add
Redirect /yourneeded.html http://example.com/index.php/12345

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
1 month 2 weeks ago - 1 month 2 weeks ago #158324 by MadhuraBL
MadhuraBL replied the topic: how to show "survey page loading message" after Token is entered?
Hi, thanks for the reply.
I tried adding redirect rule in .htaccess, but it did not work for me, and so thought of this (html file) method.

With the .htaccess method, example.com/enviro.html in browser gives me 'Not Found' error:
"Not Found
The requested URL /enviro.html was not found on this server."


code in .htaccess file:


<IfModule mod_rewrite.c>
RewriteEngine on
Redirect /enviro.html example.com/index.php/524827

# if a directory or a file exists, use it directly
RewriteCond %{REQUEST_FILENAME} !-f

# otherwise forward it to index.php
RewriteRule . index.php
</IfModule>
# General setting to properly handle LimeSurvey paths
# AcceptPathInfo on
Last Edit: 1 month 2 weeks ago by MadhuraBL.

Please Log in to join the conversation.

More
1 month 2 weeks ago #158326 by DenisChenu
DenisChenu replied the topic: how to show "survey page loading message" after Token is entered?
You don't have mod_rewrite,
Add it BEFORE <IfModule mod_rewrite.c> line

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
1 month 2 weeks ago #158343 by MadhuraBL
MadhuraBL replied the topic: how to show "survey page loading message" after Token is entered?
@DenisChenu, thanks for the reply.
How do i add mod_rewrite in .htaccess? searched in google, could not find exactly how to add that.
I printed phpinfo() inside limesurvey DocRoot, and mod_rewrite module is already there and enabled.

Just wanted to confirm my requirement:
I don't want my participants to be seeing survey IDs in the URL, even after redirection. I want them to fill in the survey under the URL https:// example.com/enviro.html and hide the survey IDs all the time.
Is this possible with .htaccess redirection? If it is, It will be really helpful if you could help me with adding mod_rewrite line.
Thanks much.

Please Log in to join the conversation.

More
1 month 2 weeks ago #158383 by DenisChenu
DenisChenu replied the topic: how to show "survey page loading message" after Token is entered?

https:// example.com/enviro.html and hide the survey IDs all the time.

It surely can be done, but rewrite are always a pity …

1st test if mod_rewrite is OK : update application/config/config.php to 'showScriptName' => false,

And : even with mod_rewrite : is LimeSUrvey put /12345 in the HTML : mod_rewrite didn't update it …

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.

Start now!

Just create your account and start using Limesurvey today.

Register now