How to edit the template of question components

More
8 months 6 days ago #152272 by khaled
khaled created the topic: How to edit the template of question components
I am trying to create a custom template, part of which I am trying to edit the template of questions components (not question.pstpl) such as QUESTION_HELP, QUESTION_VALID_MESSAGE, and most importantly ANSWER (edit the view of radio list, checkboxes and so). However I can't find any template file regarding those.
Any ideas? as the other option would be using javascript and css to override such options.

Please Log in to join the conversation.

More
8 months 6 days ago #152273 by jelo
jelo replied the topic: How to edit the template of question components

khaled wrote: However I can't find any template file regarding those.
Any ideas? as the other option would be using javascript and css to override such options.

There are no templates for these variables. CSS and Javascript are the most common ways to manipulate the output to your own needs. Modifiying PHP code is only suitable if no further updates are an option (not recommended). LS 3.0 will offering some improvements in templates and question styling. But personally I don't expect anything for productive use in 2017.

Please Log in to join the conversation.

More
8 months 6 days ago #152275 by khaled
khaled replied the topic: How to edit the template of question components
Appreciate your timely response. looking forward to the new updates then.

Please Log in to join the conversation.

More
8 months 6 days ago #152277 by tpartner
tpartner replied the topic: How to edit the template of question components
As of version 2.5, you can create template-specific custom views for questions and some of their incorporated elements - manual.limesurvey.org/The_template_edito...ws_.28version_2.5.29

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
8 months 6 days ago #152278 by jelo
jelo replied the topic: How to edit the template of question components
Thanks Tony, I always forget about that feature. Are you using that approach in productive surveys?

Please Log in to join the conversation.

More
8 months 6 days ago - 8 months 6 days ago #152279 by khaled
khaled replied the topic: How to edit the template of question components
Ah! you're a life saver! Would've hated fixing the view in the client-side!
Last Edit: 8 months 6 days ago by khaled.

Please Log in to join the conversation.

More
8 months 6 days ago #152280 by tpartner
tpartner replied the topic: How to edit the template of question components

jelo wrote: Thanks Tony, I always forget about that feature. Are you using that approach in productive surveys?

Yeah, I quite often remove a lot of the Bootstrap wrapping elements among other client-specific modifications.

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.

Start now!

Just create your account and start using Limesurvey today.

Register now
Join our Newsletter!