- Posts: 23
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
{Qcode.question} delete style
- mi_for
- Topic Author
- Offline
- Junior Member
Less
More
2 years 6 months ago #220333
by mi_for
{Qcode.question} delete style was created by mi_for
Hi all,
in my survey I have a couple of text-display questions showing the name of a person in the question text (qcodes are per1 to per5). The question text is formatted with "<h2>" and "<strong>". Later in the survey I am using those names of the persons as answer options in a multiple choice question. For this I set answer option 1 to {per1.question}, answer option 2 to {per2.question} and so on. So far so good, but when I now display the multiple choice question the original style from the questions per1 to per5 are kept. This means the answer options are displayed as h2 and strong.
My "dirty" solution was to change the display of h2 and strong in that question via css, but this seems quite shady.
Is there an easier or cleaner solution?
Cheers,
Michael
in my survey I have a couple of text-display questions showing the name of a person in the question text (qcodes are per1 to per5). The question text is formatted with "<h2>" and "<strong>". Later in the survey I am using those names of the persons as answer options in a multiple choice question. For this I set answer option 1 to {per1.question}, answer option 2 to {per2.question} and so on. So far so good, but when I now display the multiple choice question the original style from the questions per1 to per5 are kept. This means the answer options are displayed as h2 and strong.
My "dirty" solution was to change the display of h2 and strong in that question via css, but this seems quite shady.
Is there an easier or cleaner solution?
Cheers,
Michael
The topic has been locked.
- Joffm
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 12881
- Thank you received: 3965
2 years 6 months ago #220344
by Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Replied by Joffm on topic {Qcode.question} delete style
How do you get the names that you display in your text-display questions?
IF they are piped from another question or attribute by equation you may use these.
Maybe it is better you show us the problem by sending an lss export of these relevant questions.
Joffm
IF they are piped from another question or attribute by equation you may use these.
Maybe it is better you show us the problem by sending an lss export of these relevant questions.
Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10099
- Thank you received: 3589
2 years 6 months ago #220345
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic {Qcode.question} delete style
Try:
- manual.limesurvey.org/ExpressionScript_-...mplemented_functions
Code:
strip_tags(per1.question)
- manual.limesurvey.org/ExpressionScript_-...mplemented_functions
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The following user(s) said Thank You: DenisChenu, mi_for
The topic has been locked.
- mi_for
- Topic Author
- Offline
- Junior Member
Less
More
- Posts: 23
- Thank you received: 0
2 years 6 months ago #220361
by mi_for
Replied by mi_for on topic {Qcode.question} delete style
Perfect. That's exactly what I was searching for.
Thank you so much.
Maybe an additional hint for others looking at the posting. When used in specifying the answer items ("edit subquestions") the full code is:
(I misplaced the brackets and parenthesis in the beginning)
Thank you so much.
Maybe an additional hint for others looking at the posting. When used in specifying the answer items ("edit subquestions") the full code is:
Code:
{strip_tags(per1.question)}
The topic has been locked.