- Posts: 7
- Thank you received: 1
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Numerical Input Form Question.
- pvb8008
- Topic Author
- Offline
- New Member
Less
More
7 years 3 months ago #145448
by pvb8008
Numerical Input Form Question. was created by pvb8008
I noticed that the Numerical Input question type is coded as <input type="text" when I look at the source code on Limesurvey. In HTML5 it should be coded as <input type="number". This is important when filling out a form on a mobile device as the keyboard automatically defaults to a number keyboard not letters. This spares the user from having to use the shift key to pull up the number keyboard.
How and where can the code be edited so the all Numerical Input question types are presented as <input type="number" ?
Thanks,
Peter
How and where can the code be edited so the all Numerical Input question types are presented as <input type="number" ?
Thanks,
Peter
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10634
- Thank you received: 3698
7 years 3 months ago #145450
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 Numerical Input Form Question.
I think it is set to type="text" to allow for comma as decimal separator. Some Android devices don't have a comma in the numeric keypad.
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
- pvb8008
- Topic Author
- Offline
- New Member
Less
More
- Posts: 7
- Thank you received: 1
7 years 3 months ago #145452
by pvb8008
Replied by pvb8008 on topic Numerical Input Form Question.
Tony,
Noted. Two follow up questions.
1) Does the application allow editing of this or is it baked into the core program?
I am relatively new to LimeSurvey or at least version 2.56.1, so I don't know if such modifications can be done or are even recommended.
2) I have been using the Numerical Input question type as the most logical one for a question that requires a number for an answer where using a dropdown or preset range would be limiting. In your opinion is this the best choice for such a question?
Thank you for your reply!
Peter
Noted. Two follow up questions.
1) Does the application allow editing of this or is it baked into the core program?
I am relatively new to LimeSurvey or at least version 2.56.1, so I don't know if such modifications can be done or are even recommended.
2) I have been using the Numerical Input question type as the most logical one for a question that requires a number for an answer where using a dropdown or preset range would be limiting. In your opinion is this the best choice for such a question?
Thank you for your reply!
Peter
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13935
- Thank you received: 2551
7 years 3 months ago #145467
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 Numerical Input Form Question.
Hi,
Yes : i think it's better to have type='number' for numeric item. Always ...
Like type='date' for date.
BUT : if we set it to 'number' : we break a lot of existing installation .... because of radix testing (comma as decimal separator).
I already use a javascript solution for this : if radix=="." then set numeric item to type='number'. ,Maybe it can be great to have it in a plugin/
Yes : i think it's better to have type='number' for numeric item. Always ...
Like type='date' for date.
BUT : if we set it to 'number' : we break a lot of existing installation .... because of radix testing (comma as decimal separator).
I already use a javascript solution for this : if radix=="." then set numeric item to type='number'. ,Maybe it can be great to have it in a 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 topic has been locked.
- Joffm
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 12790
- Thank you received: 3940
7 years 3 months ago #145538
by Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Replied by Joffm on topic Numerical Input Form Question.
Hi,
but PLEASE do not change this to type="number" as long as Firefox displays it with this silly spinner.
Best regards
Joffm
but PLEASE do not change this to type="number" as long as Firefox displays it with this silly spinner.
Best regards
Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Attachments:
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13935
- Thank you received: 2551
7 years 3 months ago #145544
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 Numerical Input Form Question.
I like the spinner
But more : if i do it, i do it with a plugin, enable only if radix is '.' .
Think if LS core have it : it's a 'option' or a new question type.
Denis
But more : if i do it, i do it with a plugin, enable only if radix is '.' .
Think if LS core have it : it's a 'option' or a new question type.
Denis
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.