Welcome to the LimeSurvey Community Forum

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

working with a hidden index

  • cshaw
  • cshaw's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
9 years 2 months ago - 9 years 2 months ago #115842 by cshaw
working with a hidden index was created by cshaw
I am using the "Show question index / allow jumping" = Incremental, setting for a survey. However, I am suppressing the display of the index until the respondent reaches the end of the survey.
Code:
    <script type="text/javascript">
        $(document).ready(function() {
            $('#index').hide();        
            $("#index").remove();
            $('.withindex').removeClass('withindex');  
    });
    </script>

At which point I am providing a button by which the respondent can go back to the beginning of a group of questions and edit. That all works fine.

However: NOW I want to pass the page number $('thisstep').value() of the summary back when the user clicks my custom button to edit a previously answered question group, so that after that question group has been completed I will be able to give the option to jump back to the summary rather than clicking next until the summary is reached.

The tricky part is knowing how to get the summary page number from the summary page back to the group. My thought was to pass the information in a URL link rather than using a button. Not seeing how to trigger a URL to utilize the index control instead of a button control. And if I did get a URL to work, how to pass anything in the URL.

Crazy idea?
Last edit: 9 years 2 months ago by cshaw.
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
9 years 2 months ago #115847 by DenisChenu
Replied by DenisChenu on topic working with a hidden index
I think we allow only $_POST parameters for step, we must do own $_POST/submit . It can be done, but really tricky.

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 following user(s) said Thank You: cshaw
The topic has been locked.
  • cshaw
  • cshaw's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
9 years 2 months ago #115862 by cshaw
Replied by cshaw on topic working with a hidden index
It would be nice to be able to refer to a question later in the survey when your are allowing jumping.

In my particular case, respondents enter family member health history information, each relative in a separate group.

I provide a summary page after all the relatives have been entered. The summary includes buttons to jump back to edit the group for each relative's history.

When the respondent utilizes the buttons to return to a relative and edit, I have no way to know if they have already seen the overall summary or not, and whether or not I should provide a button (utilizing the index) to jump back to the overall summary after the edits.

Currently I can provide a button regardless, and if the summary hasn't been seen, clicking the button does nothing. However if the summary has been seen, clicking the button returns the respondent to the summary.

SO if I had any way to know that a later question had been visited (the overall summary) then I would know whether to hide the button that allows jumping. It seems wrong to have a button to show a summary when clicking on it has no action.

The problem is that when you attempt to refer to a question later in a survey, lime balks. This makes sense if the question has never been visited, or if you have used "Previous" to move back, which is like erasing answers.

However when utilizing the index and jumping to a previous question, you should be able to refer to the values previously entered. They do exist, when you jump back it is as if you had never left and you can view the values. SO it seems like we ought to be able to access them programmatically.

Maybe we can refer to a later question from earlier in the survey and I just don't know how, or maybe we can't and we should work on making it an option to allow references to later questions.
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose