adrianmak Posted April 24, 2015 Posted April 24, 2015 I could not find similar option in field settings
LostKobrakai Posted April 24, 2015 Posted April 24, 2015 There isn't one in the admin interface and I think it's because it seems to be a rare case that a simple fixed number will be used as default. As soon as it needs to be more dynamic a hook or module is most likely the more flexible answer.
a-ok Posted January 6, 2016 Posted January 6, 2016 Can I bring this back up? The Integer field has an option (see attached) but it doesn't seem to do anything?
horst Posted January 6, 2016 Posted January 6, 2016 The meaning is, that, if there isn't explicitly set a value, the return would be NULL (blank field) and not the integer 0.
LostKobrakai Posted January 6, 2016 Posted January 6, 2016 And implicitly that does also mean that with the first setting (blank == 0) you cannot save a value of 0 for that field. It will then be treated as empty and not save the 0. Therefore a default value of 0 is the same as empty.
a-ok Posted January 6, 2016 Posted January 6, 2016 So, in order to return 0, I would need to make blank and 0 different?
a-ok Posted February 12, 2016 Posted February 12, 2016 This still doesn't work, by the way. I just need the default value to be 0. When I create a new page with that field, it's blank... not 0.
Juergen Posted October 6, 2017 Posted October 6, 2017 Doesn`t work in 3.0.78 too. Inputfield will be always blank if default value is entered.
Robin S Posted October 6, 2017 Posted October 6, 2017 GitHub issue opened here: https://github.com/processwire/processwire-issues/issues/399 4
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now