adrianmak Posted April 24, 2015 Share Posted April 24, 2015 I could not find similar option in field settings Link to comment Share on other sites More sharing options...
LostKobrakai Posted April 24, 2015 Share 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. Link to comment Share on other sites More sharing options...
a-ok Posted January 6, 2016 Share 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? Link to comment Share on other sites More sharing options...
kongondo Posted January 6, 2016 Share Posted January 6, 2016 .......(see attached) ..... ? Link to comment Share on other sites More sharing options...
rick Posted January 6, 2016 Share Posted January 6, 2016 1 Link to comment Share on other sites More sharing options...
a-ok Posted January 6, 2016 Share Posted January 6, 2016 Hahaha updated all! Link to comment Share on other sites More sharing options...
horst Posted January 6, 2016 Share 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. Link to comment Share on other sites More sharing options...
LostKobrakai Posted January 6, 2016 Share 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. Link to comment Share on other sites More sharing options...
a-ok Posted January 6, 2016 Share Posted January 6, 2016 So, in order to return 0, I would need to make blank and 0 different? Link to comment Share on other sites More sharing options...
a-ok Posted February 12, 2016 Share 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. Link to comment Share on other sites More sharing options...
Juergen Posted October 6, 2017 Share Posted October 6, 2017 Doesn`t work in 3.0.78 too. Inputfield will be always blank if default value is entered. Link to comment Share on other sites More sharing options...
Robin S Posted October 6, 2017 Share Posted October 6, 2017 GitHub issue opened here: https://github.com/processwire/processwire-issues/issues/399 4 Link to comment Share on other sites More sharing options...
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