List (ratio) with prefix and sufix for numerical input?

Mehr
11 Monate 5 Tage her - 11 Monate 5 Tage her #157607 von nhotovas
nhotovas erstellte das Thema List (ratio) with prefix and sufix for numerical input?
Hi all,

I have a List(Radio) question, and one of the options/answers should have a possibility for inputting a number. With other words, one option should be i.e. „About [HERE INPUT A NUMBER] costumers order online. “
It should look like this:


I temporary resolved this with the option "other", but the problem is that the number should be between some words and not at the end.
Do you have any ideas how to add suffix on "other“ or any other solution to resolve this?

Thanks for help.
Anhang:
Letzte Änderung: 11 Monate 5 Tage her von nhotovas.

Bitte Anmelden oder Registrieren um an der Konversation teilzunehmen.

Mehr
11 Monate 5 Tage her #157614 von tpartner
tpartner antwortete auf das Thema: List (ratio) with prefix and sufix for numerical input?
You should be able to move the input via JavaScript.

What LimeSurvey version are you using?

Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

Bitte Anmelden oder Registrieren um an der Konversation teilzunehmen.

Mehr
11 Monate 4 Tage her #157619 von nhotovas
nhotovas antwortete auf das Thema: List (ratio) with prefix and sufix for numerical input?
Thank you for your response. I assumed it could be solved with JavaScript, and I tried but did not manage... but honestly I am not an expert for JavaScript :(
I would appreciate a lot your help if you had an example for sharing.

I use version 2.05+ Build 141229.
Regards!

Bitte Anmelden oder Registrieren um an der Konversation teilzunehmen.

Mehr
11 Monate 4 Tage her - 11 Monate 4 Tage her #157623 von tpartner
tpartner antwortete auf das Thema: List (ratio) with prefix and sufix for numerical input?
1) Insert something like this as the "Label for 'Other:' option":

About <span class="value">x</span> customers order online.

2) Add this script to the question source:

<script type="text/javascript" charset="utf-8">
	$(document).ready(function() {
		$('#question{QID} .other-item span.value').after($('#question{QID} label[for$="othertext"]')).remove();
	});
</script>



Sample survey attached:

Dateianhang:

Dateiname: limesurvey...8-15.lss
Dateigröße:16 KB

Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Anhang:
Letzte Änderung: 11 Monate 4 Tage her von tpartner.

Bitte Anmelden oder Registrieren um an der Konversation teilzunehmen.

Mehr
11 Monate 4 Tage her #157627 von nhotovas
nhotovas antwortete auf das Thema: List (ratio) with prefix and sufix for numerical input?
It works!!! Thank you very much!!!

Bitte Anmelden oder Registrieren um an der Konversation teilzunehmen.

Mehr
7 Monate 6 Tage her #161704 von nhotovas
nhotovas antwortete auf das Thema: List (ratio) with prefix and sufix for numerical input?
Dear Tony,

In my company have plans to upgrate lime version (probably on 2.7X). So i imported my survey from 2.05 on trial version of lime , just to see how it will works, but unfortunately this code what you recomended doesn't work. It worked perfectly in lime 2.05. Do you have any idea why it shouldn't work on new lime versions? I worry if I don't find solution, becouse users used to have it in this form.
Now it looks like:



Thank you in advance...
Anhang:

Bitte Anmelden oder Registrieren um an der Konversation teilzunehmen.

Mehr
7 Monate 6 Tage her #161710 von jelo
jelo antwortete auf das Thema: List (ratio) with prefix and sufix for numerical input?

nhotovas schrieb: Do you have any idea why it shouldn't work on new lime versions?

LimeSurvey 2.7X is using a complete different template system. So nearly all workarounds which depended on HTML modification via Javascript need an update. With LS 3.0 the whole templatesystem changes again. So you might wait till LS 3.0 is hitting the street and then start the migration tests.

Bitte Anmelden oder Registrieren um an der Konversation teilzunehmen.

Mehr
7 Monate 5 Tage her #161727 von holch
holch antwortete auf das Thema: List (ratio) with prefix and sufix for numerical input?
I agree with Jelo. If you you are thinking about upgrading now at this point in time, I would wait a little longer until a stable 3.0 is out (was promissed for this year, but I am not sure how realistic this still is). However, we already have Release Candicate 3, so I guess it can only take a few weeks until a stable release will be published. Hopefully this was not such a quick shot and the template system will stay stable for quite some time (but I think it will, because Denis took care of it and I think he is more the "stable" kind of guy anyway). Then it will also be worth to develop own templates and for Tpartner to develop his workarounds.

I'm not a LimeSurvey GmbH member. I answer at the LimeSurvey forum in my spare time. No support via private message.
Some helpful links: Manual (EN) | Question Types | Workarounds

Bitte Anmelden oder Registrieren um an der Konversation teilzunehmen.

Mehr
7 Monate 5 Tage her #161732 von tpartner
tpartner antwortete auf das Thema: List (ratio) with prefix and sufix for numerical input?
Yes, I would also wait for 3.x before updating - many many improvements.

Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

Bitte Anmelden oder Registrieren um an der Konversation teilzunehmen.

Mehr
7 Monate 5 Tage her #161747 von nhotovas
nhotovas antwortete auf das Thema: List (ratio) with prefix and sufix for numerical input?
Hi all...

thank you for your advices, but the company will gradually upgrade to the 3.0 and for the current needs the upgrade to 2.72.6 will be done now. The other surveys do not have same problem like I am facing with this upgrade, so I must search for some way out and solution for my problem.
Any idea?

Bitte Anmelden oder Registrieren um an der Konversation teilzunehmen.

Mehr
7 Monate 5 Tage her - 7 Monate 5 Tage her #161748 von holch
holch antwortete auf das Thema: List (ratio) with prefix and sufix for numerical input?
"but the company will gradually upgrade to the 3.0 and for the current needs the upgrade to 2.72.6 will be done now."
Makes totally sense. Waiting 3 years with upgrades, then, when 2.7x is getting to end of life and 3.0 is about to come out make a quick upgrade to 2.7x.

I assume the next update and upgrade to 3.x is planned in about 2 years, when 4.0 is coming out? ;-)

I'm not a LimeSurvey GmbH member. I answer at the LimeSurvey forum in my spare time. No support via private message.
Some helpful links: Manual (EN) | Question Types | Workarounds
Letzte Änderung: 7 Monate 5 Tage her von holch.

Bitte Anmelden oder Registrieren um an der Konversation teilzunehmen.

Mehr
7 Monate 5 Tage her #161752 von tpartner
tpartner antwortete auf das Thema: List (ratio) with prefix and sufix for numerical input?
This will work for 2.72.5...

1) HTML for the Other label:

About <span class="post-text"> customers order online.</span>

2) JavaScript:

<script type="text/javascript" charset="utf-8">
	$(document).ready(function() {
		$('#question{QID} input[type="text"]').parent().after('<div class="pull-left post-text-wrapper" style="padding:5px 0 0 5px;" />');
		$('#question{QID} .post-text-wrapper').append($('#question{QID} span.post-text'));
	});
</script>

Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

Bitte Anmelden oder Registrieren um an der Konversation teilzunehmen.

Mehr
7 Monate 3 Tage her #161783 von nhotovas
nhotovas antwortete auf das Thema: List (ratio) with prefix and sufix for numerical input?
Actually, my favorite number is 5, maybe I can wait 5.0 :laugh:

I am not the one who decide in my company, but as I told you, I am informed that they have plans to upgrade it step by step, I suppose they have reasons for what they do that.
However, the fact is that my company have chosen LimeSurvey and not some other survey tool...and upgrade ...better late than never ;)

Bitte Anmelden oder Registrieren um an der Konversation teilzunehmen.

Mehr
7 Monate 3 Tage her #161784 von nhotovas
nhotovas antwortete auf das Thema: List (ratio) with prefix and sufix for numerical input?
Dear Tony...thank you very very much...you help as always...
I had double text after input box, so i deleted it from "Other" label and I added one more append on JavaScript...now its everything ok...

Best Regards!

Bitte Anmelden oder Registrieren um an der Konversation teilzunehmen.

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