Welcome to the LimeSurvey Community Forum

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

new variable to use with regular expression and get answer time

  • marcomarenco
  • marcomarenco's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
6 years 10 months ago - 6 years 10 months ago #153490 by marcomarenco
Hi,
in some question i use regular expression to get answer's value:
{strtoupper(A0.NAOK)}

or i take qid, gid and sid:
Survey ID: {SID} Group ID: {GID} Question ID: {QID}

now, i've added an hidden inputbox (in group description) to get a numerical value:
<input id="txtPer" name="txtPer" type="hidden" value="" />
i've checked with firebug and i can see the post value.

it is possible to have something like:
{txtPer}
so i can use it ?

another question:
with regular expression is it possible to get the time for the previous answer?
e.g:
the question is: What is the capital of India?
the user could answer in 1 sec or in 10 sec, or don't answer.
i can check if the asnwer is empty, and there's a way to get the time, so i could set a personalized feeback, after the question?


thanks in advance
Last edit: 6 years 10 months ago by marcomarenco.
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Away
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
6 years 10 months ago - 6 years 10 months ago #153496 by tpartner
1) Expression Manager variables only apply to LimeSurvey elements. I'm not sure why you added that input - it will not be recorded in the data.

2) I'm not exactly sure what you are trying to do but I think you will need to insert a hidden question and load it with JavaScript.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Last edit: 6 years 10 months ago by tpartner.
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose