-
-
Notifications
You must be signed in to change notification settings - Fork 264
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support leading zeroes for the number field #7175
base: main
Are you sure you want to change the base?
Conversation
5e9e47f
to
a1f1769
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be a nice addition, however the naming could be more general as we did with the currency field.
What do you think? Or do you consider the number field a totally different case?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be nice to set the maximum allowed leading zero's?
Or even a minimum amount of digits (excluding decimals)?
We could probably put more time into this to figure out how many zeroes to limit to or if padding should be done as well. |
Is it possible to just make it so the zeros can be entered? User can enter 0123 or 00123 and it displays as entered? |
@sc0ttkclark @reedtsutton Just an idea for a first solution. So basically, within the "_format" selectbox we add an option "none" or "any" witch disabled all formats but only runs the value through a regex that filters out everything except for decimals (if enabled). |
Hey guys any update on this one? |
Hey guys wondering if there is going to be any movement on this? |
We just need to sort out exactly what we want from this enhancement. I'll look at this in the upcoming release when I can. |
There is actually a separate (but probably related?) issue where an entry of 0 in the currency field is being treated to be a null value (see screenshots #1 and #2). This compounds when I try to pass the value to another post type, and the resulting field ends up being blank (screenshots #3 and #4). |
8d0fcd4
to
544f1f8
Compare
557a510
to
510f18e
Compare
01fb40a
to
c64b059
Compare
Description
This PR adds support for the number field having leading zeroes even after formatting.
via feedback at https://wordpress.org/support/topic/leading-zero-in-number-field-3/
Testing instructions
TBD
Screenshots / screencast
TBD
Changelog text for these changes
TBD
PR checklist