Check out the LimeSurvey source code on GitHub!

unnecessary line break before and after the value containd in curly braces

More
3 years 3 months ago #101138 by Locher
Hi!

I use Limesurvey Version 2.00+ Build 130929
I created a multiple numeric fields question with subquestions that contain a reference to the value of a previous question. Lets say Q1 SQ001 has N1 as value
In Q2 SQ001 as lable I have a text "This is the label of subquestion. Before you estimated {Q1_SQ001.value} % market share"

For the respondent it looks like the following. All the parts are on new lines:

This is the label of subquestion. Before you estimated
N1
% market share

How can I make that all apears on one line like this:
This is the label of subquestion. Before you estimated N1 % market share.

I would apreciate your help.
Best

Please Log in to join the conversation.

More
3 years 3 months ago #101155 by tpartner
Check the source of the question text for unwanted line breaks (<br /> tags).

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

Please Log in to join the conversation.

More
3 years 3 months ago #101185 by Locher
OK, I looked at the HTML that the page produce when I fill out the survey with a dummy and there it looks like this:

<label for="answer822221X37X839SQ001">
DGN. You estimated a current market share of
<span id="LEMtailor_Q_839_95"></span>
%
</label>

When I am in the administration at the level of the subquestions and I clic on HTML editor on the specified subquestion it looks like this:

DGN. You estimated a current market share of {current_market_SQ001.value}%

I have also tried with an additional space after the curly brace:

DGN. You estimated a current market share of {current_market_SQ001.value} %

The same result for both. Can the <span> cause the breaks? If so I don't know how to avoid that, because in the editor the tag doesn't apear and there are no <br> anywhere.

Can you lead me in this?
Thanks for your help.

Please Log in to join the conversation.

More
3 years 3 months ago #101187 by tpartner
Yes, the span could be causing the line-break if there is a CSS rule causing it to display block.

What template are you using?

Can you activate a test survey so we can see the source and styles?

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

Please Log in to join the conversation.

More
3 years 3 months ago #101188 by Locher
Something strange just happend and resolved my problem. I exported the question and imported it again in another group and now the whole phrase appears correctly on one line.
Thanks for your thoughts tpartner.

Please Log in to join the conversation.

Imprint                   Privacy policy         General Terms & Conditions         Revocation information and revocation form