Welcome, Guest
Username: Password: Remember me

TOPIC: Load unfinished survey button

Load unfinished survey button 2 years 1 week ago #86955

  • joss
  • joss's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 16
  • Karma: 0
Hello,
I'd like to hide the "Load unfinished survey" from the survey's page because it always confuses the visitors.
They don't know if the Load or the Resume Later buttons are the same.
I'd like to have only the "Submit", "Resume later" and "Exit" buttons.
How could I do that?

I would like to put the "load unfinished survey" button or link outside the survey, but as I see the button uses the post method and I can't see the exact url where I should make the link.

Can someone help?

Thanks in advance
The administrator has disabled public write access.

Re: Load unfinished survey button 2 years 3 days ago #87162

  • joss
  • joss's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 16
  • Karma: 0
I managed to put some code in order to load a survey using GET variables.

in index.php I have it in line 664, I changed
//Allow loading of saved survey
if ( isset($_POST['loadall']) && $_POST['loadall'] == $clang->gT("Load Unfinished Survey") )
{
    require_once("load.php");
}

into
//Allow loading of saved survey
if ( (isset($_POST['loadall']) && $_POST['loadall'] == $clang->gT("Load Unfinished Survey")) || ($_GET['loadall'] == "loadsurvey") )
{
    require_once("load.php");
}

Using GET now I can have the link to load a survey from anywhere
www.mydomain.com/index.php?sid=123456&loadall=loadsurvey
The administrator has disabled public write access.

Re: Load unfinished survey button 2 years 3 days ago #87164

  • joss
  • joss's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 16
  • Karma: 0
In order to hide the Load unfinished survey button I changed line 332 in replacements.php to hide the input tag

this
$_saveall = "\t\t\t<input type='submit' name='loadall' value='" . $clang->gT("Load Unfinished Survey") . "' class='saveall' " . (($thissurvey['active'] != "Y") ? "disabled='disabled'" : "") . "/>"
into this
$_saveall = "\t\t\t<!-- <input type='submit' name='loadall' value='" . $clang->gT("Load Unfinished Survey") . "' class='saveall' " . (($thissurvey['active'] != "Y") ? "disabled='disabled'" : "") . "/> -->"
The administrator has disabled public write access.
Moderators: ITEd
Time to create page: 0.527 seconds
Donation Image