Jump to content

Recommended Posts

Posted

Privet! I've just found that if you create integer field with minimal allowed value 0 (zero), then it doesn't save it. As a result, input accepts negative values even with HTML5 input type. Is it a bug or feature?

Posted

hmm, sounds like a bug, because zero is an integer. a workaround may be to leave the min blank in the fieldtype and use min="0" in the html5 tag in your template. 

<input type="number" name="quantity" min="0">

Posted

dharmanerd, thanks! It works for own templates but doesn't work in page admin frontend. Perhaps Rayan should look at it. Thanks!

Posted

yep, I didn't think about that and my workaround doesn't do you any good in this case. 

I had a look at the module and this is by design, but I don't think Ryan had considered the case where you may want a zero, but not negative numbers. I think it needs to be submitted as a bug.

In the meantime, try commenting line 30 in wire/core/modules/InputField/InputfieldInteger.module and let me know if that works.

  • Like 1
Posted

I've had reporting this issue on my todo-list for a while.. current behavior is obviously a bit off, as there are quite a few situations where you want to allow positive numbers or a zero :)

Posted

GitHub is great way to go. Forum is fine too, specially when you are not sure if it's a bug or not (so more people looks for it and maybe tries to reproduce).

  • 4 years later...
Posted

Hi,

On GitHub it's posted as solved, although I still get that problem with integer fields on Form Builder.

Anybody still having that problem?

Posted
On 9/3/2018 at 4:16 AM, lenoir said:

Hi,

On GitHub it's posted as solved, although I still get that problem with integer fields on Form Builder.

Anybody still having that problem?

Bring up your Form Builder related issue in the Form Builder VIP Forum

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...