Prefill survey using previous responses

Plus d'informations
il y a 2 mois 1 semaine #181439 par leadmeout
COM_KUNENA_MESSAGE_CREATED_NEW
Hello,

we have a pro license for the offline app and would like to use the "prefill" option for several of our surveys.

However, I keep encountering JS errors when adding the source code to the question. I am currently testing one question in one survey.

Could someone please tell me if the code is correct?

I copied it from the FAQ article: www.offlinesurveys.com/ufaqs/prefill-sur...ng-previous-response

<p>What is your name?</p>
<script type="text/javascript" charset="utf-8">
	$(document).ready(function() {
      var questionObj = $('#question' + {QID});
      questionObj.addClass(“prefill”);
    });
</script>

Do I have to make changes to the code based on my survey?

Removing the script results in no errors when syncing the survey on the app.

Thank you in advance for your assistance.

Cheers.

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

LimeSurvey Partners
Plus d'informations
il y a 2 mois 1 semaine #181445 par lfanfoni
COM_KUNENA_MESSAGE_REPLIED_NEW
In LimeSurvey 3.X I think isn't necessary to add JS to that question, but just define in the advanced options of that question the CSS class = prefill
In my free offline this works well

Aiutaci a far crescere la comunità italiana di LimeSurvey: vai sul forum Italiano per richieste e soluzioni citando sempre la versione usata, non scrivere in privato, suggerisci modifiche o nuove traduzioni - www.limesurvey.org/forum/italian-forum/118441
Les utilisateur(s) suivant ont remercié: aaskoura

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

Plus d'informations
il y a 2 mois 1 semaine #181450 par leadmeout
COM_KUNENA_MESSAGE_REPLIED_NEW
This worked for me. Thank you so much!! :)

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!