Detecting if user is on last question group

More
2 months 4 days ago #218449 by phinpope
Is there an variable in template system to check if you are on the last group (submit button instead of next)?

 

Please Log in to join the conversation.

More
2 months 4 days ago #218450 by tpartner
You can check if the progress is 100% something like this:

{# Only in the last group #}
{% if aSurveyInfo.progress.currentstep/aSurveyInfo.progress.total == 1 %}
	<p>This is the last group!</p>
{% endif %}

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The following user(s) said Thank You: DenisChenu, phinpope

Please Log in to join the conversation.

More
2 months 4 days ago #218452 by phinpope
Hadn't thought of doing it that way. Thanks.

Please Log in to join the conversation.

More
2 months 1 day ago - 2 months 1 day ago #218483 by DenisChenu
Or
{% if aSurveyInfo.aNavigator.aMoveNext.value == "movesubmit" %}
    <p>This is submit group!</p>
{% endif %}
See github.com/LimeSurvey/LimeSurvey/blob/27...n/navigator.twig#L45

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.
Last edit: 2 months 1 day ago by DenisChenu. Reason: type=php
The following user(s) said Thank You: phinpope

Please Log in to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now