Welcome to the LimeSurvey Community Forum

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

how to put a link in a drop down list answer instead of plain text

  • Mondejar
  • Mondejar's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 6 months ago #206607 by Mondejar
Hello

I need to display a list of articles in a drop down list question, but also I need the article name to be a link to a descriptive pdf of the article. I have tried to enter the articles as a Url instead of text using html coding, but when viewing the survey within a dropdown question, the html code is ignored, and it is displayed as text as seen in the attached image.

Is there a way to do this? It's very puzzling because when you edit the answer, Limesurvey shows an edit window that allows you to change the text color, size, and insert a link. But when the list is drop down in the preview, all the answers are shown as plain text ignoring any html format that has been entered.

Is there any way to do this in Javascript?
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 6 months ago #206648 by DenisChenu
dropdown HTML didn't allow htmp in option text.

See reference : developer.mozilla.org/en-US/docs/Web/HTML/Element/select

You must use radio list.

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.
  • Mondejar
  • Mondejar's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 6 months ago #206716 by Mondejar
I hoped somebody knew how to do it using some short Javascript. A number of radio buttons question is a solution. But I rather prefer a single array of drop down text column.

I'm considering to use an equation question which might provide the url of the selected article parsing the article name. This is feasible since the name of the pdf files is a short chain of characters, and I can concat it to the name of the article deployed in the drop down.

Thank you for your kind answer.
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 6 months ago #206718 by DenisChenu
When i want to add HTML inside dropdow : i use select2.org/

BUT : how user select the answer OR choose to follow link ? I don't really see how user interaction is done.

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.
  • Mondejar
  • Mondejar's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 6 months ago #206721 by Mondejar
If there was any Javascript doing the trick I assume it might work by doing a single click for selecting and doble click for following the link, or any other click plus key stroke combination. The point is to make it easy for the client to watch the article features he is selecting.

I didn't know select2.org. It's cool, thanks.
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 6 months ago #206724 by tpartner
In my opinion, that will confuse the respondents. You should use normal web behaviour whenever possible. I would present the link in another question after the drop-down item is selected.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
  • Mondejar
  • Mondejar's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 6 months ago #206729 by Mondejar
Yes, after considering it, I'm working now in that line, using an equation question to generate the link.

Thank you Dennis for your kind help.
The topic has been locked.
  • Mondejar
  • Mondejar's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 6 months ago #206730 by Mondejar
Sorry I meant Tpartner now. Thanks Tpartner
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose