Your search did not match any results.
Field Set

Field Set

DevExtreme ships with CSS classes that allow you to define the appearance of list-like structures that contain multiple field items -- field sets.

A Simple Field Set

To create a basic field set, use the dx-fieldset CSS class for the main container element. Then, use the dx-fieldset-header class to specify the field set header. The header element can contain plain text, UI components, or custom markup.

Create field set items as separate elements with the dx-field class. The field element can include label and value elements. To define the label element, use the dx-field-label class. The value element uses the dx-field-value-static class and can display plain text or custom markup.

A Field Set with DevExtreme Widgets

You can also use DevExtreme UI components as value elements. Specify the dx-field-value class in the component's HTML markup.

A Field Set with Custom Value Width

To align all field set elements by width, attach a custom id to the element with the dx-fieldset class and apply CSS rules according to the rules in the demo.

Backend API
Copy to CodePen
Apply
Reset
$(() => { $('#address').dxTextBox({ value: '424 N Main St.', }); $('#city').dxTextBox({ value: 'San Diego', }); $('#notes').dxTextArea({ value: 'Kevin is our hard-working shipping manager and has been helping that department work like clockwork for 18 months. When not in the office, he is usually on the basketball court playing pick-up games.', height: 80, }); });
<!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>DevExtreme Demo</title> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0" /> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script> <script>window.jQuery || document.write(decodeURIComponent('%3Cscript src="js/jquery.min.js"%3E%3C/script%3E'))</script> <link rel="stylesheet" type="text/css" href="https://cdn3.devexpress.com/jslib/22.1.5/css/dx.common.css" /> <link rel="stylesheet" type="text/css" href="https://cdn3.devexpress.com/jslib/22.1.5/css/dx.light.css" /> <script src="https://cdn3.devexpress.com/jslib/22.1.5/js/dx.all.js"></script> <link rel="stylesheet" type="text/css" href="styles.css" /> <script src="index.js"></script> </head> <body class="dx-viewport"> <div class="demo-container"> <div class="form"> <div class="dx-fieldset"> <div class="dx-fieldset-header">Simple Field Set</div> <div class="dx-field"> <div class="dx-field-label">Full Name</div> <div class="dx-field-value-static">Kevin Carter</div> </div> <div class="dx-field"> <div class="dx-field-label">Position</div> <div class="dx-field-value-static">Shipping Manager</div> </div> </div> <div class="dx-fieldset"> <div class="dx-fieldset-header">Field Set with DevExtreme Widgets</div> <div class="dx-field"> <div class="dx-field-label">Address</div> <div class="dx-field-value"> <div id="address"></div> </div> </div> <div class="dx-field"> <div class="dx-field-label">City</div> <div class="dx-field-value" id="city"></div> </div> </div> <div class="dx-fieldset" id="notes-container"> <div class="dx-fieldset-header">Field Set with Custom Value Width</div> <div class="dx-field"> <div class="dx-field-label">Notes</div> <div class="dx-field-value"> <div id="notes"></div> </div> </div> </div> </div> </div> </body> </html>
.dx-fieldset:first-child > h4:first-child { margin-top: 0; } #notes-container > .dx-field > .dx-field-label { width: 20%; } #notes-container > .dx-field > .dx-field-value { width: 80%; }