Post attributes into welcome message\question summary

More
1 year 2 months ago #213422 by jlindemann
I'm attempting to place attributes within the welcome message or a question summary.  In either case, it's going into text\html fields when editing.  But what I get back when I test is just {ATTRIBUTE_1}

In the email section, I modified the emails being sent to include the attributes unique to that user.  (gathered from the CSV file I uploaded).  When I sent out an email the correct attributes are listed within the email showing the appropriate names/numbers related to the client and the survey they are filling out.

I attempted to use the same theory on the survey itself.  The reason being is that each user may fill out multiple surveys, so it would be helpful that it indicates at the top which survey this is for.  But when I do this all the user sees are:
{ATTRIBUTE_1} {ATTRIBUTE_2} {ATTRIBUTE_3}
{ATTRIBUTE_4}
when they should see the appropriate info pull from the database (ie)
GroupName ClassName SectionName
InstructorName

What has to be done differently on the welcome message\question summary to properly pull this info as it was doing in the email section?
The topic has been locked.
More
1 year 2 months ago #213428 by holch
You need to either switch off the WYSIWYG Editor or use the source editor available with the WYSIWYG Editor.

Also, you probably need to use {TOKEN:ATTRIBUTE_1} etc instead of {ATTRIBUTE_1}.

Yes, I know, it is weird, but within the survey you need to indicate that this is an attribute from the token table. In the emails it is clear that it is from the token table, because the survey hasn't been filled yet, but within the survey LS probably would search for a question called "ATTRIBUTE_1", I guess. Not the best usability, but hey, grown "organically". ;-)

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.
More
1 year 2 months ago - 1 year 2 months ago #213433 by jlindemann
Yes, this messed me up when I was doing the email templates.  I started with {TOKEN:ATTRIBUTES_1} and soon learned I just needed {ATTRIBUTES_1}

I've gone back to the survey and added {TOKEN:ATTRIBUTES_1} in place of the old setting that used to be giving me the angry red on yellow text, it now has the better brown on yellow text.

So the survey appears to understand that syntax better.  But not really.
Once I run the survey, the ugly red/yellow text still appears (where I left the original for comparison).  But where the brown/yellow text should be is just blank.
Last edit: 1 year 2 months ago by jlindemann.
The topic has been locked.
More
1 year 2 months ago #213480 by holch
Not quite sure what you refer to with "Angry red on yellow text" and "better brown on yellow text". Could you show an example?

I guess these are the error highlights of Expression manager.

But are you sure you used {TOKEN:ATTRIBUTES_1}, because this would be of course wrong. The S is too much.

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.
More
1 year 2 months ago - 1 year 2 months ago #213498 by jlindemann
Here's a snip of what it looks like.
When you run the survey, you will see the "angry red text", but the other doesn't show up and is just blank.  But if I use just the ATTRIBUTE_2 in the email template, it has no issue.


Here's the question edit screen to see the written code.
Last edit: 1 year 2 months ago by jlindemann.
The topic has been locked.
More
1 year 2 months ago #213515 by Joffm
Is the survey active?

In a survey itself you have to refer to the TOKEN -> TOKEN:ATTRIBUTE_1.
But in the email you don't have to refer to the TOKEN, that's obvious in this case, so ATTRIBUTE_1 is sufficient.

I know, not very consistent; moreover in your csv-file to upload participants with attributes, you have to use lower case "attribute_1"

Joffm


Volunteers are not paid.
Not because they are worthless, but because they are priceless
The topic has been locked.
More
1 year 2 months ago #213520 by jlindemann
The survey is active.  When I run the survey from a link from the distributed email this is what it looks like.

As indicated from the previous images, I believe the attributes are correctly set  ie   {TOKEN:ATTRIBUTE_1}
but when set correctly, they don't show any information
The only thing you see is the one attribute I set incorrectly (for comparison)

The topic has been locked.
More
1 year 2 months ago #213522 by Joffm
A very quick try.

Welcome Text:
 

and the result:
 

So, the only thing is, you send your survey as lss.

Joffm


Volunteers are not paid.
Not because they are worthless, but because they are priceless
Attachments:
The topic has been locked.
More
1 year 2 months ago #213523 by holch
And of course your token table to see what is written in the token table and what is supposed to show up. Because if there is nothing saved in the attribute for a specific token, of course it won't show anything.

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.
More
1 year 2 months ago #213541 by jlindemann
OK, I think I got this figured out. Or at least I'm hoping I do.

What we've done is that Question#1 is just a text area giving some basic intro info.  We took the sub-questions of this and added headers and pre-populated the fields with {TOKEN:ATTRIBUTE_1} and it appears to be working correctly and pulling the (4) attributes when I run my test scenarios.

Because our users may receive multiple surveys at one time we just wanted an identifier on the survey to help remind them as to which one they were taking.

Somehow, somewhere, those fields went blank.  I might have done it in one of the templates.  Once I figured this out it was just a matter of getting the code back into those fields.

Appears to be working now.

If anyone is interested in looking at the .lss I'm happy to share
The topic has been locked.

Start now!

Just create your account and start using Limesurvey today.

Register now