Welcome to the LimeSurvey Community Forum

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

last question shows next instead of submit button

  • joeschwab
  • joeschwab's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
2 years 5 months ago #221975 by joeschwab
I have a survey where the last question has a condition. This last question is in its own group. If this condition is false the survey displays a next button instead of a submit button on the previous question. I have tried a bunch of different workaround attempts, placing it the previous group, pudding the condition on the group instead of the question and stuff like that. Nothing seems to work and am kind of stumped. 

I have seen some posts in the forums about just changing the name of the button with jquery, but I really need the submit action because I need to pass the screener id {SAVEID} value to the next survey. Without the submit button, this value doesnt get saved / created.

Any help would be greatly appreciated.
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
2 years 5 months ago #221977 by holch
Can you send a small sample LSS that shows the problem?

And if you say condition: are you really using the condition designer or is it more a relevance equation that you are using?

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
2 years 5 months ago #221978 by holch
Ahhh, and what Limesurvey version are you running on?

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

The topic has been locked.
  • joeschwab
  • joeschwab's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
2 years 5 months ago - 2 years 5 months ago #221982 by joeschwab
Hi Holch.We have LimeSurvey Version 3.18.0 190923. I have a relevance equation, but have also tried with the condition designer.I have attached an lss file.Thanks!
Last edit: 2 years 5 months ago by joeschwab. Reason: replace attachment
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
2 years 5 months ago #221983 by holch
First of all, before you try to debug anything, is to update to the latest version of your LS3 branch. Your installation is over 2 years old, this is like decades in internet years. I don't think it makes sense to try to debug anything on such an old installation. If you don't want to update your production installation (which I would still recommend on the long run, because given all the new privacy laws like GDPR, LGPD and how they are are all called, I wouldn't want to run a software on the internet collecting personal data that hasn't been updated or received any bug fixes and security updates for well over 2 years), make a new install to test.

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
2 years 5 months ago #221985 by holch
So I imported your LSS file.

Found this in one of the first questions: "did not geta a test", might want to change the typo. ;-)

Now I tested the survey with being 18 and I got the last page. Shouldn't the relevance equation prevent me from getting the last question? Oh, I think the relevance equation is wrong.
Code:
((Qage.NAOK > 13) or Qage.NAOK < 17)

I mean, if you use OR here, any age will get this question, because everyone is either above 13 or below 17. I assume you are looking for people older than 13 and younger than 17, right (14-16 year olds).

And then the brackets are also odd, there are at least some brackets missing or some too much. Will test some more.

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
2 years 5 months ago #221986 by holch
OK, there are quite a few other mistakes there. Here what you have in your end message:
Code:
{if((Qage.NAOK < 13) or (Qage.NAOK > 17),"<h2>Thank you for your interest in our study.</h2><p>We appreciate you taking the time to answer our questions.","ScreenerID={SAVEID}")}</p>

I see two major problems: It should be called SAVEDID not SAVEID, this is the first mistake and probably the cause of your question.

And then there is some logical error in the ages.

Because to show the last page the people should be > 13 and < 17 which would equal to 14-16.

But to show the SAVEDID you use < 13 (12 years or younger) and > 17 (18 or older. What about the 13 year olds and the 17 year olds?

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
2 years 5 months ago #221987 by holch
By the way, the SAVEDID is only shown when the survey is active, not in the preview mode, because in the preview mode there has not been created any database entry, thus there is also no SAVEDID.

Please find the "fixed" LSS attached. Everything should work now. The button still says "next" but it works just like a "submit" button.

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

The topic has been locked.
  • joeschwab
  • joeschwab's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
2 years 5 months ago #221988 by joeschwab
This is all great help I appreciate it! Really amazing!We do actually want to display the last question for those who are ineligible. but I can change the operators back.Thanks again, this has been a tremendous help!
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Away
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
2 years 5 months ago #221989 by Joffm
Only on the last page the submit button (which is always of type "ls-button-submit") shows the text "Submit", on all other pages "Next".
And each click on this button submits the data of the actual page.

So, if the last page isn't shown because of your relevance equation you will never see a "Submit" displayed.
This can be an advantage to join two survey seamlessly.

And if you want to show the word "Submit" to all participants, you only need to add a further question, e.g. a text display where you thank them for their time or whatever.
This way anybody sees a "Submit".

Joffm 

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The following user(s) said Thank You: joeschwab
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
2 years 5 months ago #222000 by holch
The problem with your relevance equation was that the limits where wrong, in my opinion you had two ages, 13 and 17, that where not reflected. Have a look again. I might be wrong, but...

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose