- Posts: 25
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Select template from token field?
- ChacoKevy
- Topic Author
- Offline
- Junior Member
Less
More
7 years 11 months ago #136099
by ChacoKevy
Select template from token field? was created by ChacoKevy
I found the section of the manual that discusses changing the logo in a template, but I was wondering if more is possible. Is there a way to just select a different template altogether based on a value passed from a token field? I wasn't able to find any such thing in the manual or a previous discussion in the forums - hope I'm not wrong about that!
Thanks,
CK
Thanks,
CK
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13597
- Thank you received: 2487
7 years 11 months ago #136116
by DenisChenu
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.
Replied by DenisChenu on topic Select template from token field?
Not actually
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.
- Maverick87Shaka
- Offline
- Senior Member
Less
More
- Posts: 62
- Thank you received: 3
7 years 11 months ago #136118
by Maverick87Shaka
Replied by Maverick87Shaka on topic Select template from token field?
It is a feature that would be very interested also to me, there is any chance to see this feature sometimes in a next release?
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13597
- Thank you received: 2487
7 years 11 months ago #136120
by DenisChenu
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.
Replied by DenisChenu on topic Select template from token field?
I think it's an uneeded feature : you already have a lot of solution to show different page depend on an attribute
Use body class="{TOKEN:ATTRIBUTE_1}" for example.
But you can make a feature request if you really need it
Use body class="{TOKEN:ATTRIBUTE_1}" for example.
But you can make a feature request if you really need it
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.
- Maverick87Shaka
- Offline
- Senior Member
Less
More
- Posts: 62
- Thank you received: 3
7 years 11 months ago #136123
by Maverick87Shaka
Nice, with this we can do a "dynamic" template, it's not "specific" feature for the logo, but we can use for it!
Thanks for suggestion!
Replied by Maverick87Shaka on topic Select template from token field?
Nice, so we can use something like:DenisChenu wrote: I think it's an uneeded feature : you already have a lot of solution to show different page depend on an attribute
Use body class="{TOKEN:ATTRIBUTE_1}" for example.
But you can make a feature request if you really need it
Code:
<body id="body" class="{TOKEN:ATTRIBUTE_1}">
Thanks for suggestion!
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13597
- Thank you received: 2487
7 years 11 months ago #136128
by DenisChenu
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.
Replied by DenisChenu on topic Select template from token field?
For information : for CATI+CAWI survey (phone or web survey)
I use
{if(TOKEN:ATTRIBUTE_1=="phone","<dl>","")}
{if(TOKEN:ATTRIBUTE_1=="phone","<dt>Name of person</dt>","")}
{if(TOKEN:ATTRIBUTE_1=="phone","<dt>Name of person</dt>","")}
I use
{if(TOKEN:ATTRIBUTE_1=="phone","<dl>","")}
{if(TOKEN:ATTRIBUTE_1=="phone","<dt>Name of person</dt>","")}
{if(TOKEN:ATTRIBUTE_1=="phone","<dt>Name of person</dt>","")}
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.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13597
- Thank you received: 2487
7 years 11 months ago #136130
by DenisChenu
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.
Replied by DenisChenu on topic Select template from token field?
Can not edit post ... and submiut by error
For information : for CATI+CAWI survey (phone or web survey)
I use
But you can use too
For information : for CATI+CAWI survey (phone or web survey)
I use
Code:
{if(TOKEN:ATTRIBUTE_1=="phone","<dl>","")} {if(TOKEN:ATTRIBUTE_1=="phone","<dt>Name of person</dt>","")} {if(TOKEN:ATTRIBUTE_1=="phone","<dd>TOKEN:LASTNAME</dd>","")} {if(TOKEN:ATTRIBUTE_1=="phone","</dl>","")}
But you can use too
Code:
<div {if(TOKEN:ATTRIBUTE_1!="phone","style='display:none'","")}> <p>Any content you can hide/show</p> </div>
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.
- ChacoKevy
- Topic Author
- Offline
- Junior Member
Less
More
- Posts: 25
- Thank you received: 0
7 years 11 months ago #136179
by ChacoKevy
Replied by ChacoKevy on topic Select template from token field?
Sorry, my web development skills are non-existent. Apologies if I'm misunderstanding terribly. Is your suggestion that every element on a template that we would want to change, we would simply change in the attribute fields?
Here's a sample context. I have a survey that would be used by 7 different customer groups. They all want the survey to feel as if they are on their own company's HR intranet page. I had presumed that the number of changes from group to group would require individual templates as opposed to a few attribute field replacements.
What happens when one customer's template is supposed to have flames running down the sides of the screen?
Again, sorry for any misunderstanding on my part. I just was hoping to be clear in my head before I were to make a feature request, if that's what I'm after.
Here's a sample context. I have a survey that would be used by 7 different customer groups. They all want the survey to feel as if they are on their own company's HR intranet page. I had presumed that the number of changes from group to group would require individual templates as opposed to a few attribute field replacements.
What happens when one customer's template is supposed to have flames running down the sides of the screen?
Again, sorry for any misunderstanding on my part. I just was hoping to be clear in my head before I were to make a feature request, if that's what I'm after.
The topic has been locked.
- jelo
- Offline
- Platinum Member
Less
More
- Posts: 5033
- Thank you received: 1257
7 years 11 months ago #136183
by jelo
The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
Replied by jelo on topic Select template from token field?
Wasn't there a way to dynamically change template during interview? Wasn't there something with templates from Mazi, where there is a normal and mobile optimized template. And at the beginning of the interview the template is chosen. I have no working example. So I might be wrong.DenisChenu wrote: Not actually
The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
The topic has been locked.
- holch
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 11637
- Thank you received: 2737
7 years 11 months ago #136188
by holch
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
Replied by holch on topic Select template from token field?
without any web development skills it will be difficult to achieve what you want to do.
However, with different customers I actually would setup different surveys with different templates (just to keep things clean).
What Denis is suggesting is adding a class to the body tag, based on a attribute in the token table. With this class you can define in the CSS file how this survey should look like. You can change colors, background images, fonts, etc.
However, with different customers I actually would setup different surveys with different templates (just to keep things clean).
What Denis is suggesting is adding a class to the body tag, based on a attribute in the token table. With this class you can define in the CSS file how this survey should look like. You can change colors, background images, fonts, etc.
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13597
- Thank you received: 2487
7 years 11 months ago #136194
by DenisChenu
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.
Replied by DenisChenu on topic Select template from token field?
Hi,
@jelo : oh right, remind of something like this, but never used . I really prefer separation because if we need different template , we surely need different survey .
And yes : with such solution : make a complete different template for each customer seems really difficult. Just some HTML part and CSS part.
Denis
@jelo : oh right, remind of something like this, but never used . I really prefer separation because if we need different template , we surely need different survey .
And yes : with such solution : make a complete different template for each customer seems really difficult. Just some HTML part and CSS part.
Denis
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.
- holch
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 11637
- Thank you received: 2737
7 years 11 months ago #136212
by holch
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
Replied by holch on topic Select template from token field?
In most cases adapting colors to the company colors and adding a logo might do the trick already. And this should be possible with your solution, Denis. Of course, a complete rebuild of the layout of the company's intranet will be difficult. But usually no client is willing to pay for that anyway, just my opinion.
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
The following user(s) said Thank You: DenisChenu
The topic has been locked.