Insert a new answer via javascript

Mehr
1 Monat 2 Wochen her #183982 von mpac_limes
I'm trying to insert a whole set of answers via javascript but they seem to fail validation when one of them is the selected option.

I've already seen THIS POST but either it doesn't work for me or I don't understand what I'm supposed to do. I think this same thing was a breeze to do in earlier versions of LS :(

By the way, text label and value are equally important for the purpose of the question.

I've attached a sample survey, but the point is in adding a new option via javascript and to get LS accept it as a valid answer


Thanks
Anhänge:

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

LimeSurvey Partners
Mehr
1 Monat 1 Woche her #184042 von mpac_limes
Let me reformulate the question:

What do I have to do after my javascript code has inserted a new answer option in a single choice question (dropdown) for Limesurvey to accept it as a valid one when chosen by the user.

If I insert it and then do nothing, when it is chosen it fails validation and the form won't allow to advance to the next sections.

Any help would be appreciated.

Thanks

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Mehr
1 Monat 1 Woche her - 1 Monat 1 Woche her #184047 von tpartner
It look like a validation was introduced a couple of years ago - github.com/LimeSurvey/LimeSurvey/commit/...a9d461e4ea80c9R10257

A possible workaround may be to use a short-text question and build a complete drop-down to load it with JavaScript.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Official LimeSurvey Partner - partnersurveys.com
Letzte Änderung: 1 Monat 1 Woche her von tpartner.
Folgende Benutzer bedankten sich: DenisChenu

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Jetzt loslegen!

Melden Sie sich jetzt an, und erstellen Sie in wenigen Minuten Ihre erste Umfrage.

Account einrichten

Abonnieren Sie unseren Newsletter

Abonnieren Sie unseren Newsletter für alle Neuigkeiten rund um LimeSurvey
captcha