Input format for numbers

Mehr
5 Monate 2 Tage her - 5 Monate 2 Tage her #190727 von nbubivucjufeegc
I try to put format for only .XX. Example: Only 100.22 EUR can be placed but 100,22 will execute blur effect. How to manage this? It is actually the USA format, not EU format. But only numbers are allowed and also INTEGER should not be blocked. In other words, it is allowed number, XX after comma and comma not the following character: ,

<script type="text/javascript" charset="utf-8">

$(document).ready(function() {
$('#question{QID} input.text').focus(function() {
if ($(this).val() == 0) {
$(this).val('');
}
}).blur(function() {
if ($(this).val() == '') {
$(this).val(0);
}
});
});
</script>
Letzte Änderung: 5 Monate 2 Tage her von nbubivucjufeegc.

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Mehr
5 Monate 2 Tage her #190729 von tpartner
You could use Robin Herbots Inputmask plugin with a currency alias - github.com/RobinHerbots/Inputmask

Cheers,
Tony Partner

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

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Mehr
5 Monate 2 Tage her #190750 von DenisChenu

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 .
An error happen ? Before make a new topic : remind the Debug mode .
Folgende Benutzer bedankten sich: tpartner

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Mehr
5 Monate 2 Tage her #190753 von tpartner
I would do it with a custom question theme. :)

Cheers,
Tony Partner

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

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Mehr
5 Monate 2 Tage her #190769 von DenisChenu

tpartner schrieb: I would do it with a custom question theme. :)

Yes, possible, but here : in my opinion, we don't really need update whole HTML, only js :).

I use jQuery-Mask-Plugin because it's more simple to have a editable string for the mask (in question attribute).

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 .
An error happen ? Before make a new topic : remind the Debug mode .

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