DevExtreme v24.2 is now available.

Explore our newest features/capabilities and share your thoughts with us.

Your search did not match any results.

React Form - Customize Item

You can use the items[] array to configure all form items. This array can contain strings (formData field names) and objects (item configurations).

Use a string to create a simple item with default configuration as shown for the Email item.

To give you the ability to edit code on the fly, the demo uses SystemJS. For this reason, launching the demo takes some time. We strongly recommend that you do not use this approach in real projects.
Backend API

To change the default settings, declare an item configuration object. Use the dataField property to bind an item to a field in the formData object. Use the editorType property to specify an item's data editor or configure the editor in the editorOptions object. You can also specify any other properties described in the SimpleItem section.

To customize item labels, use the label.template property. The demo uses this property to add icons to the labels. Refer to the Additional Notes item's implementation for instructions on how to add an icon with a tooltip to the label.

This demo shows how to specify editorOptions, editorType, validationRules, and colSpan properties for simple items in a Form component.