# Help with default values

**URL:** <https://jsonforms.discourse.group/t/help-with-default-values/31>\
**Category:** General\
**Created:** [April 9, 2020, 6:37pm UTC](https://jsonforms.discourse.group/t/help-with-default-values/31 "2020-04-09T18:37:09Z")\
**Posts on this page:** 1\
**Showing post:** 2

<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 15, 2020, 6:47am UTC](https://jsonforms.discourse.group/t/help-with-default-values/31/2 "2020-04-15T06:47:27Z")

</div>

Hi @ricardo-guntur, we let Ajv handle the default values. As we require certain Ajv settings you can use the exported Ajv factory `createAjv(options)` and set `useDefaults: true`. The customized Ajv can then be passed into the JsonForms component, e.g.

```auto
const handleDefaultsAjv = createAjv({useDefaults: true});
// [...]
        <JsonForms
            data={data}
            schema={schema}
            uischema={uischema}
            renderers={materialRenderers}
            cells={materialCells}
            onChange={({ errors, data }) => {console.log(data); updateData(errors, data)}}
            ajv={handleDefaultsAjv}
        />

```

---

_[View the full topic](https://jsonforms.discourse.group/t/help-with-default-values/31)._
