<p>You can:</p>

<p>1) Write a plugin that extends Craft's native Number field type and adds the functionality you're looking for.</p>

<p>2) Make a <a href="http://feedback.buildwithcraft.com" rel="nofollow">feature request</a> for a default value for the native Number field type.</p>

<p>3) Potentially fake it using something like the <a href="https://github.com/lindseydiloreto/craft-cpcss" rel="nofollow">CP CSS</a> plugin.</p>

CC BY-SA 3.0
2015-08-05T16:42:01.133Z
Thanks, Brad.  I added a feature request for this. Using a plugin for this seems like overkill.
Steve Adams
CC BY-SA 3.0
2015-08-05T16:34:22.307Z
2015-08-05T16:34:22.307Z
Brad Bell
<p>I have a case where I need to use a numeric field which also has a default value.</p>

<p>For example: <code>numericField</code> needs to have a minimum value of 100 and a max value of 1000, but when the user adds a new entry, the field value should default to 256 in the entry form. </p>

<p>Unfortunately, I cannot trust the user to enter the correct default value, even if it is clearly indicated in the field notes.</p>

<p>Right now, when the user adds a new entry, <code>numericField</code> will always be set to 100 the minimum value.  </p>

<p>Is there another integer field type which would work as I have described?</p>

<field><integer>
How to use a Numeric Field with a Default Value
# How to use a Numeric Field with a Default Value

(Asked by: username_0 on 2015-08-05)

I have a case where I need to use a numeric field which also has a default value.

For example: `numericField` needs to have a minimum value of 100 and a max value of 1000, but when the user adds a new entry, the field value should default to 256 in the entry form.

Unfortunately, I cannot trust the user to enter the correct default value, even if it is clearly indicated in the field notes.

Right now, when the user adds a new entry, `numericField` will always be set to 100 the minimum value.

Is there another integer field type which would work as I have described?

**Tags:** field, integer

---

## 1 answers

### Answer by username_1 on 2015-08-05. Score: 2 | Accepted answer

You can:

1) Write a plugin that extends Craft's native Number field type and adds the functionality you're looking for.

2) Make a [feature request](http://feedback.buildwithcraft.com) for a default value for the native Number field type.

3) Potentially fake it using something like the [CP CSS](https://github.com/lindseydiloreto/craft-cpcss) plugin.

> **Comments:**
> **username_0**: Thanks, Brad.  I added a feature request for this. Using a plugin for this seems like overkill.  

---

