- Posts: 8
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Detecting if user is on last question group
- phinpope
- Topic Author
- Offline
- New Member
Less
More
2 years 9 months ago #218449
by phinpope
Detecting if user is on last question group was created by phinpope
Is there an variable in template system to check if you are on the last group (submit button instead of next)?
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10108
- Thank you received: 3593
2 years 9 months ago #218450
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic Detecting if user is on last question group
You can check if the progress is 100% something like this:
Code:
{# 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
The topic has been locked.
- phinpope
- Topic Author
- Offline
- New Member
Less
More
- Posts: 8
- Thank you received: 0
2 years 9 months ago #218452
by phinpope
Replied by phinpope on topic Detecting if user is on last question group
Hadn't thought of doing it that way. Thanks.
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13637
- Thank you received: 2491
2 years 8 months ago - 2 years 8 months ago #218483
by DenisChenu
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.
Replied by DenisChenu on topic Detecting if user is on last question group
Or
See
github.com/LimeSurvey/LimeSurvey/blob/27...n/navigator.twig#L45
Code:
{% if aSurveyInfo.aNavigator.aMoveNext.value == "movesubmit" %} <p>This is submit group!</p> {% endif %}
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 years 8 months ago by DenisChenu. Reason: type=php
The following user(s) said Thank You: phinpope
The topic has been locked.