When are the survey elements created?

Plus d'informations
il y a 4 mois 4 semaines #182036 par LarryMartell
I have inherited a Lime system that has a custom template. The template creates questions that result in an array with answers (i.e. one question has multiple answers), and there are multiple answers for the question (i.e. one question could have answer 1: a, b, c, d and answer 2: x, y, z), organized as a table on the page. When I look at the DOM after the survey is generated I see there are 10 potential answers (rows in the table), and all but the first is hidden. There is an 'Add row' button that unhides a row when clicked. What I need to do is have the survey rendered with the first 3 answers shown. I tried to do this in the document ready function - there the table exists but has no rows. I do not see any code in the custom template that created the rows of the table. Are the rows added in some lime code? Where would I put my code to unhide 3 rows of this table?

Sorry if this is not clear, this is my first experience with lime so please bear with me.

Connexion ou Créer un compte pour participer à la conversation.

LimeSurvey Partners
Plus d'informations
il y a 4 mois 4 semaines #182055 par tpartner
If you have an 'Add row' button, you have a custom JavaScript workaround applied. If you disable that workaround, you should see all rows (sub-questions) defined in the LimeSurvey admin interface.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Official LimeSurvey Partner - partnersurveys.com

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 4 mois 4 semaines #182056 par LarryMartell
I do not want to display all the rows (there are 10), only the first 3. What is confusing me is that in the document ready function the table has no rows, but then if I inspect the DOM after the page is rendered it has 10 rows. Where would those rows get created?

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 4 mois 4 semaines #182060 par tpartner
I'm not sure what you are looking at but the rows are created server-side before the page is loaded. They may be hidden by CSS or JavaScript in your custom theme.

I suspect you are using this workaround so that will have to be modified - manual.limesurvey.org/Workarounds:_Manip...ble_Text.29_question

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Official LimeSurvey Partner - partnersurveys.com

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 4 mois 3 semaines #182308 par LarryMartell
Thanks - I got this sorted out and working. One thing I had trouble with is installing the new template.js file. I tried to upload it in the template editor, but my update did not take - nothing was changed after uploading. On the deployed system I found the template.js file in either 2 or 3 different locations (differing by deployed system) - not counting the 4, 5, 6, or 7 tmp dirs. First I updated the file in all the places I found it (not including the tmp dir), but the changes were not seen by lime. Tried restarting, logging out, removing the tmp dir (which caused lime to not run), but no matter what, no joy. The only way I could get it deployed was to put it directly in the tmp dir it was being served out of. That does not seem like the correct thing to do, but I hope whenever that tmp dir gets updated or changed it will pick up the new file from one of the 3 places it exists at.

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 4 mois 3 semaines #182309 par tpartner
There is a button in the configuration screen to reset tmp assets.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Official LimeSurvey Partner - partnersurveys.com

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 4 mois 3 semaines #182312 par LarryMartell
Where is that? Below is what I see.
Pièces jointes :

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 4 mois 3 semaines #182313 par Joffm
Réponse de Joffm sur le sujet When are the survey elements created?
Hi,
you find it here:
In "Configuration / Global Settings / General"


Joffm


Volunteers are not paid.
Not because they are worthless, but because they are priceless
Pièces jointes :

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 4 mois 3 semaines #182314 par LarryMartell
Do not see that button on that page
Pièces jointes :

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 4 mois 3 semaines #182318 par tpartner
https://pathTo/limeSurvey/index.php/admin/globalsettings

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Official LimeSurvey Partner - partnersurveys.com

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 4 mois 3 semaines #182320 par LarryMartell
Yes, I am on that page, but no button to clear assets cache. Did you look at my attached screen shot?

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 4 mois 3 semaines - il y a 4 mois 3 semaines #182321 par tammo
Réponse de tammo sur le sujet When are the survey elements created?
From looking at the image you showed in a previous post in this thread, I see that your editor (and therefore your LimeSurvey installation) is from a version earlier than 3.0

You might have to clear the cache via FTP (or update your installation to the most currect version).


Tammo ter Hark at Tools for Research
Proud developers of the TFR Responsive Limesurvey theme
toolsforresearch.com/limesurvey-responsive-template
Dernière édition: il y a 4 mois 3 semaines par tammo.

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 4 mois 3 semaines #182322 par LarryMartell
How do I clear the cache via FTP? I do have direct ssh access to the host running lime. I tried just deleting the tmp dirs but then lime would not run.

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 4 mois 3 semaines #182324 par tammo
Réponse de tammo sur le sujet When are the survey elements created?
Sorry, I need to let the people that currently still have older versions running answer, because this may have changd. I am not sure any more.

In the newer version (3.0 and up) it is at tmp/assets and tmp/runtime/cache. But if anyone knows better, please inform here!

Tammo


Tammo ter Hark at Tools for Research
Proud developers of the TFR Responsive Limesurvey theme
toolsforresearch.com/limesurvey-responsive-template

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 4 mois 3 semaines #182332 par LarryMartell
We are running Version 2.73.1+171220 and the files are served from tmp/assets - I read in a post here that I could remove the tmp dirs and they would get recreated, but when I did that they did not, and lime would not run. Luckily I had made a copy before I deleted them. But not sure what FTP has do to with this.

Connexion ou Créer un compte pour participer à la conversation.

Commencez dès maintenant !

Créez simplement un compte et commencez à utiliser LimeSurvey dès aujourd'hui.

Inscrivez-vous maintenant

Inscrivez-vous à notre Newsletter!