how to disable the movenext step for a particular question?

More
3 years 1 month ago #109414 by iscar
iscar created the topic: how to disable the movenext step for a particular question?
i think when user click button, have 2 functions:submit form and move to next question.
i want to disable the movenext function in particular question.then i add the code as below:
<script>
$(document).ready(function () {
$("button#movenextbtn").unbind("click");
});
</script>
i suppose when user click the button, the value will be submited and won't move to next question. BUT still move.
i have no idea what's the problem.
thanks for any help!

Please Log in to join the conversation.

More
3 years 1 month ago #109427 by DenisChenu
DenisChenu replied the topic: how to disable the movenext step for a particular question?
Default behaviour (from PHP) submit => move next.

I think you can play with javascript to:
Find actual step (allways same for each question)
And do something like this (on doc ready)
<script>
var step=4;
$(document).ready(function () {
$("#movenextbtn").attr("name",'move');
$("#movenextbtn").val(step);
});
</script>

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
3 years 1 month ago #109444 by iscar
iscar replied the topic: how to disable the movenext step for a particular question?
i use FF to fix the original code is :
accesskey="n" onclick="javascript:document.limesurvey.move.value='movenext';
is that actual step you mean?

Please Log in to join the conversation.

More
3 years 1 month ago #109445 by DenisChenu
DenisChenu replied the topic: how to disable the movenext step for a particular question?
LS version 1.92, rigth ?

I give you a 2.00 version .....

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
3 years 1 month ago #109446 by iscar
iscar replied the topic: how to disable the movenext step for a particular question?
i am using Version 2.00+ Build 131206

Please Log in to join the conversation.

More
3 years 1 month ago - 3 years 1 month ago #109448 by DenisChenu
DenisChenu replied the topic: how to disable the movenext step for a particular question?
Hi,

Think you can try:
<script>
$(document).ready(function () {
  var step=$("#thisstep").val();
  $("#movenextbtn").val(step);
  $("#movenextbtn").click(function(e){
    e.preventDefault();
    $("name['move']").val(step);
    $("#limesurvey").submit();
  });
});
</script>
Sorry don't remind when we update the navigator.

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 .
Last Edit: 3 years 1 month ago by DenisChenu. Reason: Move var step=$("#thisstep").val(); in ready

Please Log in to join the conversation.

More
3 years 1 month ago #109449 by iscar
iscar replied the topic: how to disable the movenext step for a particular question?
is that means this question javascript will not be functional when update to 2.05?

Please Log in to join the conversation.

More
3 years 1 month ago #109474 by iscar
iscar replied the topic: how to disable the movenext step for a particular question?
these codes doesn't work.
even i set window.location.href=" sample.com " to function, still move to next question, i think because it's faster than location.href.
i just temperatory stop the move to function for 1question, it's so hard to do it.

Please Log in to join the conversation.

Did you already participate in our customer survey?

Don't miss your chance for great prices.

Please click here to participate:

Start now

Start now!

Just create your account and start using Limesurvey today.

Register now