Welcome to the LimeSurvey Community Forum

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

Access question text for Ranking Question in Expression Manager

  • happysocrates
  • happysocrates's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
1 year 8 months ago #230801 by happysocrates
Please help us help you and fill where relevant:
Your LimeSurvey version: 5.3.28
Own server or LimeSurvey hosting: Own server
Survey theme/template: Extension Based on Bootstrap
==================

Hi

How do you access the question text for a ranking question in expression manager?

I can access the answer options and ranked answers without any problems, however I can't get access to the question itself or any of the associated attributes such as "mandatory". 

The question code is Q1, I have tried {Q1.question}, {Q1.mandatory}. This works for other questions.

Does a ranking question use a different code to access the main question?

Thanks for your help!

 

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
1 year 8 months ago #230802 by Joffm
Hi,

Does a ranking question use a different code to access the main question?

No, it does not.
Reason: There is no property implemented to access it.

In questions with subquestions there was no way to access the main question, only the subquestions by built-in core functions.
With version 4.0.0. the plugin "expressionQuestionForAll" was introduced, which - after activation - gives access to the main question of these question types:
  • arrays
  • multiple questions
You may see here
"application/core/plugins/expressionQuestionForAll/expressionQuestionForAll.php"

Here an example to show that properties work in "ranking" questions - except the text of the main question.
 

And the property ".mandatory"?
Doesn't seem to work for any question type at the moment. (5.3.25.)
Above: All questions were mandatory.

Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless

Please Log in to join the conversation.

  • happysocrates
  • happysocrates's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
1 year 8 months ago #230803 by happysocrates
Thank you! That was just the guidance I needed.

Pointing to the plugin was a big help. Unfortunately it does work for ranking questions but it helps with the others.

Please Log in to join the conversation.

Lime-years ahead

Online-surveys for every purse and purpose