# How can I define numeric inputs?

**URL:** <https://jsonforms.discourse.group/t/how-can-i-define-numeric-inputs/115>\
**Category:** General\
**Created:** [April 16, 2020, 1:30am UTC](https://jsonforms.discourse.group/t/how-can-i-define-numeric-inputs/115 "2020-04-16T01:30:02Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![discobot](https://yyz2.discourse-cdn.com/free1/user_avatar/jsonforms.discourse.group/discobot/32/3_2.png) [@discobot](https://jsonforms.discourse.group/u/discobot)\
**Post date:** [April 16, 2020, 1:30am UTC](https://jsonforms.discourse.group/t/how-can-i-define-numeric-inputs/115/1 "2020-04-16T01:30:02Z")

</div>

It has to be an input that allows handling currency values

with 2 decimal places.

this is my Schema  
“importe”: {  
type: “number”,  
default: 0,  
},

How do I add a placeHolder or default x value that is $ 100.50

_[[original thread](https://spectrum.chat/jsonforms/general/how-can-i-define-numeric-inputs~154d7dde-eb62-4930-873a-75ec2953bb70) by Marcelo Gracia]_

---

<div class="post-metadata">

**Author:** ![sdirix](https://yyz2.discourse-cdn.com/free1/user_avatar/jsonforms.discourse.group/sdirix/32/1073_2.png) [@sdirix](https://jsonforms.discourse.group/u/sdirix)\
**Post date:** [April 16, 2020, 7:29am UTC](https://jsonforms.discourse.group/t/how-can-i-define-numeric-inputs/115/2 "2020-04-16T07:29:05Z")

</div>

Hi @marcelogracia, you can use the `description` field in your JSON Schema to add some context to the control, e.g.

```auto
"amount": {
  type: "number",
  description: "Please enter a dollar value, e.g. 100.50 $"
}

```

---

<div class="post-metadata">

**Author:** ![sdirix](https://yyz2.discourse-cdn.com/free1/user_avatar/jsonforms.discourse.group/sdirix/32/1073_2.png) [@sdirix](https://jsonforms.discourse.group/u/sdirix)\
**Post date:** [April 16, 2020, 7:30am UTC](https://jsonforms.discourse.group/t/how-can-i-define-numeric-inputs/115/3 "2020-04-16T07:30:17Z")

</div>

![](https://global.discourse-cdn.com/free1/uploads/jsonforms/original/1X/c41d11b46706be655a4cf69fb6fd2f27289036ed.gif)

---

<div class="post-metadata">

**Author:** ![sdirix](https://yyz2.discourse-cdn.com/free1/user_avatar/jsonforms.discourse.group/sdirix/32/1073_2.png) [@sdirix](https://jsonforms.discourse.group/u/sdirix)\
**Post date:** [April 16, 2020, 7:30am UTC](https://jsonforms.discourse.group/t/how-can-i-define-numeric-inputs/115/4 "2020-04-16T07:30:19Z")

</div>

In the React Material renderers the description will be rendered below the input

---

<div class="post-metadata">

**Author:** ![sdirix](https://yyz2.discourse-cdn.com/free1/user_avatar/jsonforms.discourse.group/sdirix/32/1073_2.png) [@sdirix](https://jsonforms.discourse.group/u/sdirix)\
**Post date:** [April 16, 2020, 7:30am UTC](https://jsonforms.discourse.group/t/how-can-i-define-numeric-inputs/115/5 "2020-04-16T07:30:47Z")

</div>

![](https://global.discourse-cdn.com/free1/uploads/jsonforms/original/1X/a3f9e497f5f5582c3ca06fa7ea2d21d8bade71d0.gif)

---

<div class="post-metadata">

**Author:** ![sdirix](https://yyz2.discourse-cdn.com/free1/user_avatar/jsonforms.discourse.group/sdirix/32/1073_2.png) [@sdirix](https://jsonforms.discourse.group/u/sdirix)\
**Post date:** [April 16, 2020, 7:30am UTC](https://jsonforms.discourse.group/t/how-can-i-define-numeric-inputs/115/6 "2020-04-16T07:30:49Z")

</div>

In the Angular Material renderers it will be shown as a placeholder

---

<div class="post-metadata">

**Author:** ![discobot](https://yyz2.discourse-cdn.com/free1/user_avatar/jsonforms.discourse.group/discobot/32/3_2.png) [@discobot](https://jsonforms.discourse.group/u/discobot)\
**Post date:** [April 16, 2020, 10:22am UTC](https://jsonforms.discourse.group/t/how-can-i-define-numeric-inputs/115/7 "2020-04-16T10:22:46Z")

</div>

_[Marcelo Gracia]_

@sdirix Thanks for your reply
