Welcome to the LimeSurvey Community Forum

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

Problem with Array by column filter

  • Soeren
  • Soeren's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
9 years 10 months ago - 9 years 10 months ago #108206 by Soeren
Problem with Array by column filter was created by Soeren
Hello
I tried to do this: manual.limesurvey.org/Workarounds:_Manip...2Multiple-Options.22
But it didn´t work out.
Like in the discribition I placed the functions in my template.js file:




Then I placed the script in the source of one of the questions:



But it didn`t work. Can somebody help me. Where is the mistake I made?
best
Soerioes
Last edit: 9 years 10 months ago by Soeren.
The topic has been locked.
More
9 years 10 months ago - 9 years 10 months ago #108207 by urbana
Replied by urbana on topic Problem with Array by column filter
did you insert the question text after placing the javascript?
then you replaced the script with your question text

i place my javascript in the help text

You can check the following things (use chrome for that):
1. Start the question and check the javascript console for errors
2. Right Mouse click on the question -> Inspect Element -> search for your script in the source code is it there? if not perhaps you overwrited it

[strike]Further: I noticed that you start the function with two var's - but the function ist defined with three var's, qMultiopt, qArray, prevPage
Perhaps that causes an error[/strike] -> forget that :)

But again check the console
Last edit: 9 years 10 months ago by urbana.
The topic has been locked.
  • Soeren
  • Soeren's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
9 years 10 months ago #108209 by Soeren
Replied by Soeren on topic Problem with Array by column filter
I placed the source in the help text. But it is still not working.
I checked the console and this is what it looks like:

I think that the function is there. But I am not sure.
Attachments:
The topic has been locked.
More
9 years 10 months ago #108210 by urbana
Replied by urbana on topic Problem with Array by column filter
Yes the function is there but check the console are there any errors?
The topic has been locked.
  • Soeren
  • Soeren's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
9 years 10 months ago #108211 by Soeren
Replied by Soeren on topic Problem with Array by column filter
And i got this Error. But I don´t know what that means
Attachments:
The topic has been locked.
More
9 years 10 months ago - 9 years 10 months ago #108212 by urbana
Replied by urbana on topic Problem with Array by column filter
I'm sorry I didn't recognized it
You have to call the function like that:
filterArrbyCol("QuesitinID")

You have to use Quotes!! Without quotes JavaScript searchs for variables with that namea but of course they doens't exists

Sorry for the spelling but i m writing from my phone with german layout
Last edit: 9 years 10 months ago by urbana.
The topic has been locked.
  • Soeren
  • Soeren's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
9 years 10 months ago #108213 by Soeren
Replied by Soeren on topic Problem with Array by column filter
Sorry. But it is still not working.
The console shows the following mistake:

Attachments:
The topic has been locked.
More
9 years 10 months ago - 9 years 10 months ago #108216 by urbana
Replied by urbana on topic Problem with Array by column filter
Good morning yes but now we know the calling is Correct but the systems tells you the function you call doesn't exists.

Are you sure the function is in your template.JS
Are you sure the survey has the design with the template including the function

You can try to put the Function before the call in the helptext
Last edit: 9 years 10 months ago by urbana.
The topic has been locked.
  • Soeren
  • Soeren's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
9 years 10 months ago #108236 by Soeren
Replied by Soeren on topic Problem with Array by column filter
When I place the skript in the helptext. It just shows the text itself.

Attachments:
The topic has been locked.
  • Soeren
  • Soeren's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
9 years 10 months ago #108237 by Soeren
Replied by Soeren on topic Problem with Array by column filter
Is it possible that I have only version 2.00?
Because I just realised this:

Attachments:
The topic has been locked.
More
9 years 10 months ago #108239 by urbana
Replied by urbana on topic Problem with Array by column filter
Yes you have Version 2.0 but that isn't the problem.
Of course you have to place the script in HTML Mode

So click in the helptext and then click on Quellcode (Sourcecode)
And then paste it there
The topic has been locked.
  • Soeren
  • Soeren's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
9 years 10 months ago #108240 by Soeren
Replied by Soeren on topic Problem with Array by column filter
That is what I did. Do I have to put a tag before the code?
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose