Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

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

  • MadhuraBL
  • MadhuraBL's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
6 years 6 months ago - 6 years 6 months ago #158320 by MadhuraBL
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 , 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
Last edit: 6 years 6 months ago by DenisChenu. Reason: Usage of example.(com|org) please
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
6 years 6 months ago #158321 by DenisChenu
Think it better (and easy too) to do it in PHP with php redirect
Code:
<?php
  header('Location: /index.php/1234');
  exit();
?>

Or update htaccess and add
Code:
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 , plugin development .
I don't answer to private message.
The topic has been locked.
  • MadhuraBL
  • MadhuraBL's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
6 years 6 months ago - 6 years 6 months ago #158324 by MadhuraBL
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: 6 years 6 months ago by MadhuraBL.
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
6 years 6 months ago #158326 by DenisChenu
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 , plugin development .
I don't answer to private message.
The topic has been locked.
  • MadhuraBL
  • MadhuraBL's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
6 years 6 months ago #158343 by MadhuraBL
@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.
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
6 years 6 months ago #158383 by DenisChenu

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 , plugin development .
I don't answer to private message.
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose