problem using "replacement field properties"

More
1 year 2 months ago #205992 by Thomassie
Another day, another problem :)

I am using google chrome and my limesurvey version is 3.23.4

I want to use the answer of a previous question in my question text. So that is why I use the "replacement field properties". This works like a charm, except with the option "other".

This is the line I use:

You picked a {INSERTANS:518832X193X766} {INSERTANS:518832X193X766other}.


The placeholder gets perfectly replaced, but when someone uses the "other" option and fills in "tomato". This is what comes on the screen:

You picked a -oth- tomato.

What could be the reason for this?

Please Log in to join the conversation.

More
1 year 2 months ago #205994 by Joffm
Hi,
The reason is, that the "normal" question stores the value "-oth-" and the "Other" stores "tomato".
If you display both you get both.

I always advice to activate the survey, add a few well defined data and have a look at the responses.

Like here.


And without the INSERTANS stuff - that is really old - you do this easier by Expression Manager.

Therefore you have to do an IF statement to display.
Like
{IF(!is_empty(Q0_other),Q0_other,Q0.shown)}
If Q0_other is not empty, display it, otherwise display the text of Q0, not only the code





Joffm


Volunteers are not paid.
Not because they are worthless, but because they are priceless
Attachments:
The following user(s) said Thank You: Thomassie

Please Log in to join the conversation.

More
1 year 2 months ago #205996 by Thomassie
Thank you Joffm!

thanks a million!

Please Log in to join the conversation.

More
9 months 1 week ago #212425 by SCHEP23
Hello, I'm trying to use this workaround too. Honestly I'm not sure where should I put the IF ({IF(!is_empty(Q0_other),Q0_other,Q0.shown)}) instruction...
Could you help me?
Thanks
Laura

Please Log in to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now