Jump to content

is it possible to set a default value of an integer input field type ?


Recommended Posts

Posted

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.

  • 8 months later...
Posted

The meaning is, that, if there isn't explicitly set a value, the return would be NULL (blank field) and not the integer 0.

Posted

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.

  • 1 month later...
Posted

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.

  • 1 year later...

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...