Welcome to the LimeSurvey Community Forum

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

How to set conditions for dropdown in a multiple short text ?

  • tpartner
  • tpartner's Avatar
  • Away
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
4 years 10 months ago #185746 by tpartner
There should also be keyup events attached to the original (now hidden) text input. No?

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
4 years 10 months ago #185749 by DenisChenu

tpartner wrote: There should also be keyup events attached to the original (now hidden) text input. No?

Yes right …
github.com/LimeSurvey/LimeSurvey/blob/e2...em_javascript.js#L27

Then maybe it can work with updating
Code:
// Listener on the dropdowns - insert selected values into hidden text input
    $('#question'+qID+' select').change(function() {
      $(this).next('input[type="text"]').val($(this).val()).trigger('change');
    });
to
Code:
// Listener on the dropdowns - insert selected values into hidden text input
    $('#question'+qID+' select').change(function() {
      $(this).next('input[type="text"]').val($(this).val()).trigger('keyup');
    });

PS @tpartner : .answer-item :text BUT .dropdown-item select . Unsure : maybe .answer-item select ?
But maybe too : remove Class usage , and use select[data-em] or something siilar (have issue with Question Theme or Question plugins about css usage and EM)

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Away
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
4 years 10 months ago #185751 by tpartner
Yep, I tried keyup, that didn't work either. (I suspect something to do with the first date workaround applied)

As far as I know, my solution works.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose