- Posts: 1
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Input format for numbers
- nbubivucjufeegc
- Topic Author
- Offline
- New Member
Less
More
4 years 5 months ago - 4 years 5 months ago #190727
by nbubivucjufeegc
Input format for numbers was created by 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>
<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>
Last edit: 4 years 5 months ago by nbubivucjufeegc.
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10098
- Thank you received: 3589
4 years 5 months ago #190729
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic Input format for numbers
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.
The following user(s) said Thank You: gabrieljenik
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13597
- Thank you received: 2487
4 years 5 months ago #190750
by 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 .
I don't answer to private message.
Replied by DenisChenu on topic Input format for numbers
I really need to publish clearly my plugins
gitlab.com/SondagesPro/QuestionSettingsType/jquerySimpleMask
Usage of github.com/igorescobar/jQuery-Mask-Plugin
gitlab.com/SondagesPro/QuestionSettingsType/jquerySimpleMask
Usage of github.com/igorescobar/jQuery-Mask-Plugin
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 following user(s) said Thank You: tpartner
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10098
- Thank you received: 3589
4 years 5 months ago #190753
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic Input format for numbers
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.
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13597
- Thank you received: 2487
4 years 5 months ago #190769
by DenisChenu
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 .
I don't answer to private message.
Replied by DenisChenu on topic Input format for numbers
Yes, possible, but here : in my opinion, we don't really need update whole HTML, only js .tpartner wrote: I would do it with a custom question theme.
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 .
I don't answer to private message.
The topic has been locked.
- mdwhitby
- Offline
- New Member
Less
More
- Posts: 2
- Thank you received: 0
3 years 11 months ago - 3 years 11 months ago #198804
by mdwhitby
What is the proper way to install this plugin? Thank you.
Replied by mdwhitby on topic Input format for numbers
DenisChenu wrote: I really need to publish clearly my plugins
gitlab.com/SondagesPro/QuestionSettingsType/jquerySimpleMask
Usage of github.com/igorescobar/jQuery-Mask-Plugin
What is the proper way to install this plugin? Thank you.
Last edit: 3 years 11 months ago by mdwhitby.
The topic has been locked.
- Joffm
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 12881
- Thank you received: 3964
3 years 11 months ago #198821
by Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Replied by Joffm on topic Input format for numbers
Hi,
1. download from gitlab
2. Unzip and upload the folder to "/plugin" directory of your installation
3. Activate in "Configuration / Plugin manager"
Joffm
1. download from gitlab
2. Unzip and upload the folder to "/plugin" directory of your installation
3. Activate in "Configuration / Plugin manager"
Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13597
- Thank you received: 2487
3 years 11 months ago #198863
by 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 .
I don't answer to private message.
Replied by DenisChenu on topic Input format for numbers
Not 4.X compatible.
Currently no Question Attribute plugin can be 4.X compatible.
Currently no Question Attribute plugin can be 4.X compatible.
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.