css
Optional. The name of a CSS class(es) applied to the control group
css?: string;
Example
<style>
.custom {
--dhx-background-primary: rgb(238, 238, 238);
--dhx-color-primary: #118d8d;
--dhx-color-primary-active: #118d8d;
--dhx-color-primary-hover: #1ad1d1;
}
</style>
<script>
const form = new dhx.Form("form_container", {
padding: 40,
width: 400,
css: "custom",
rows: [
{
type: "input",
label: "Name",
placeholder: "John Doe",
},
{
type: "input",
label: "Email",
placeholder: "jd@mail.name"
},
// more controls
]
});
</script>
Related sample: Form. Styling (custom CSS)
Note, that the DHTMLX library provides a set of own CSS classes that you can also apply to change the appearance of Form:
const form = new dhx.Form("form_container", {
css: "dhx_widget--bg_white"
});
Related articles: