Welcome to the LimeSurvey Community Forum

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

Use custom field value as placeholder?

  • eavenhuang
  • eavenhuang's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
1 year 8 months ago #243554 by eavenhuang
Use custom field value as placeholder? was created by eavenhuang
Please help us help you and fill where relevant:
Your LimeSurvey version: [see right hand bottom of your LimeSurvey admin screen]
Own server or LimeSurvey hosting:
Survey theme/template:
==================

Dear Experts,

I'm just curious if it's possible to include the custom attribute value in the question text. For example we have custom attribute called ticketNumber and I want to show it in the question text, if the URL contains the ticketNumber say 001, then the question text will display 001 as well.. I tried to use placeholder but seems that's not how it should work:(

below is my failed text example
*******Please take a moment to share your thoughts and let us know how you will rate the service of this service ticket.Ticket Number: {TicketID.shown}Ticket Agent: {TicketAgent.shown}

Please Log in to join the conversation.

  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
1 year 8 months ago - 1 year 8 months ago #243558 by tpartner
Replied by tpartner on topic Use custom field value as placeholder?
The term "custom attribute" normally refers to a token attribute but I think you are refering to a URL parameter.

To access that, it will need to be loaded into a survey question.

See here about prefilling a question via the URL - www.limesurvey.org/manual/URL_fields#Pre...using_GET_parameters

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Last edit: 1 year 8 months ago by tpartner.

Please Log in to join the conversation.

  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
1 year 8 months ago #243578 by holch
Replied by holch on topic Use custom field value as placeholder?
Also, I think .shown is not the correct way to use here.

.shown will give you a answer option as it has been shown in your survey.

However, I assume you save a TicketID into a text box, sow there was no answer option shown, as it is open text.

So {TicketID}, should do the trick, given that TicketID is the name of a text question where you stored the ID to.

Help us to help you!
  • Provide your LS version and where it is installed (own server, uni/employer, SaaS hosting, etc.).
  • Always provide a LSS file (not LSQ or LSG).
Note: I answer at this forum in my spare time, I'm not a LimeSurvey GmbH employee.

Please Log in to join the conversation.

Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose