I added a number field to my site where I want to collect a decimal number (specifically a dollar amount). However the default step="0" does not work in Chrome. I have no problems submitting in Firefox. Looking around it seems that Chrome expects step to be set to "any" if decimals should be allowed. I tested Firefox and it seems it also accepts "any" as a value for step.

I think there should be a check in the theme function that changes step to "any" if it's set to 0. I attached a patch that does this for me.

Comments

berenddeboer’s picture

Priority: Normal » Major
StatusFileSize
new613 bytes

I prefer a slightly different patch. As this currently breaks chrome, I've set the priority to major.

rooby’s picture

Status: Needs review » Reviewed & tested by the community

#1 works for me.

quicksketch’s picture

Priority: Major » Normal
Status: Reviewed & tested by the community » Fixed

Hi guys, this problem has been solved for some time by #1611772: Cannot create Number component that allows Decimal input that works in some browsers. It's fixed in the 3.19 release.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.