ODK 2.0 Survey decimal fields issue with numeric keypad

https://groups.google.com/forum/#!searchin/opendatakit/decimal$20keypad/opendatakit/Dh5KDLLH9GU/hTG_zcJdQikJ

I am seeing an issue running survey where decimal fields pull up a numeric keypad with no decimal point or minus sign available.

Some devices (e.g. Samsung Galaxy S5) have the issue others do not.

Is this a known issue and does anyone know a workaround better than using strings?

The link in this post is from someone with similar issue and they are using strings as a workaround.

Thanks,
tom

The 'numeric' keypad is probably different for different keyboard choices
(e.g., Swype vs Google vs Swiftkey, etc.

I would first experiment with changing the type of keyboard.

Otherwise, you can try customizing the HTML that is used for numeric input
by specifying your own template for that HTML. How the HTML tags map to
different keyboards is up to the browser, so this will likely not fix the
problem; hence why I recommend changing the system keyboard first.

To customize the HTML, create a 'templatePath' column in your XLS file.
This will be a path relative to the location of the XLSX file (and
formDef.json file).

Then copy and modify the existing template for decimal numbers. The default
template is identified under the 'templatePath' member variable in the
corresponding prompt type in the standard prompts file
(app/framework/survey/js/prompts.js). In this case, the decimal prompt is a
subclass of the input_type prompt, and that uses the template:
app/framework/survey/templates/input_type.handlebars

Copy that template to your XLSX directory, rename it (e.g.,
'custom_decimal.handlebars'), and reference this template by specifying
'custom_decimal.handlebars' in your XLSX file.

You can then modify it to see if you can get an alternate keyboard by
changing styles or with different attributes. The 'inputAttributes' array
includes a type="number" designation, which is what pops up the reduced
keyboard for numeric output.

Handlebars is the templating framework http://handlebarsjs.com/

··· On Sat, May 2, 2015 at 9:20 AM, <7shriner@gmail.com> wrote:

https://groups.google.com/forum/#!searchin/opendatakit/decimal$20keypad/opendatakit/Dh5KDLLH9GU/hTG_zcJdQikJ

I am seeing an issue running survey where decimal fields pull up a numeric
keypad with no decimal point or minus sign available.

Some devices (e.g. Samsung Galaxy S5) have the issue others do not.

Is this a known issue and does anyone know a workaround better than using
strings?

The link in this post is from someone with similar issue and they are
using strings as a workaround.

Thanks,
tom

--
You received this message because you are subscribed to the Google Groups
"ODK Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to opendatakit-developers+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
Mitch Sundt
Software Engineer
University of Washington
mitchellsundt@gmail.com

Thanks for the help. It seems that it is a Samsung specific issue. If the Samsung keypad is replaced by another keypad (e.g. google) it works as expected.

tom

Hello Tom,
I had this problem with a specific tablet using regular ODK. The following
is not ideal, but it is worth a quick test. For a decimal input, if I
wanted 39.5 for example, I could enter 39 then swipe to my next question.
When I swipe back to the original question, I see 39.0 in the field, at
which point I can go in and change the 0 to 5. It worked in my case but it
is quite klugey.
Curtis

··· 2015-05-04 18:39 GMT+02:00 Mitch Sundt :

The 'numeric' keypad is probably different for different keyboard choices
(e.g., Swype vs Google vs Swiftkey, etc.

I would first experiment with changing the type of keyboard.

Otherwise, you can try customizing the HTML that is used for numeric input
by specifying your own template for that HTML. How the HTML tags map to
different keyboards is up to the browser, so this will likely not fix the
problem; hence why I recommend changing the system keyboard first.

To customize the HTML, create a 'templatePath' column in your XLS file.
This will be a path relative to the location of the XLSX file (and
formDef.json file).

Then copy and modify the existing template for decimal numbers. The
default template is identified under the 'templatePath' member variable in
the corresponding prompt type in the standard prompts file
(app/framework/survey/js/prompts.js). In this case, the decimal prompt is a
subclass of the input_type prompt, and that uses the template:
app/framework/survey/templates/input_type.handlebars

Copy that template to your XLSX directory, rename it (e.g.,
'custom_decimal.handlebars'), and reference this template by specifying
'custom_decimal.handlebars' in your XLSX file.

You can then modify it to see if you can get an alternate keyboard by
changing styles or with different attributes. The 'inputAttributes' array
includes a type="number" designation, which is what pops up the reduced
keyboard for numeric output.

Handlebars is the templating framework http://handlebarsjs.com/

On Sat, May 2, 2015 at 9:20 AM, 7shriner@gmail.com wrote:

https://groups.google.com/forum/#!searchin/opendatakit/decimal$20keypad/opendatakit/Dh5KDLLH9GU/hTG_zcJdQikJ

I am seeing an issue running survey where decimal fields pull up a
numeric keypad with no decimal point or minus sign available.

Some devices (e.g. Samsung Galaxy S5) have the issue others do not.

Is this a known issue and does anyone know a workaround better than using
strings?

The link in this post is from someone with similar issue and they are
using strings as a workaround.

Thanks,
tom

--
You received this message because you are subscribed to the Google Groups
"ODK Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to opendatakit-developers+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
Mitch Sundt
Software Engineer
University of Washington
mitchellsundt@gmail.com

--
You received this message because you are subscribed to the Google Groups
"ODK Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to opendatakit-developers+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--

Curtis BRODERICK
Head of technical training and user support

---------------------------EpiConcept---------------------------
Systèmes d'Information en Santé
Health Information Systems
47, rue de Charenton - 75012 PARIS
Tel : +33 (0)1 53 02 40 60 Fax : +33 (0)1 53 02 40 62