Skip to content

Latest commit

 

History

History
126 lines (115 loc) · 4.53 KB

File metadata and controls

126 lines (115 loc) · 4.53 KB
sidebar_label Form Button properties
title JavaScript Form - Button Properties
description You can explore the Properties of the Button control of Form in the documentation of the DHTMLX JavaScript UI library. Browse developer guides and API reference, try out code examples and live demos, and download a free 30-day evaluation version of DHTMLX Suite.

Button properties

Usage

{
    type: "button",
    name?: string,
    id?: string, // must be unique if set, auto-generated if not set
    
    text?: string,
    submit?: boolean, // false by default
    url?: string,
    
    css?: string,
    disabled?: boolean, // false by default
    height?: string | number | "content", // "content" by default
    hidden?: boolean, // false by default
    padding?: string | number,
    width?: string | number | "content", // "content" by default

    // button view
    circle?: boolean, // false by default
    color?: "danger" | "secondary" | "primary" | "success", // "primary" by default
    full?: boolean, // false by default
    icon?: string,
    loading?: boolean, // false by default
    size?: "small" | "medium", // "medium" by default
    view?: "flat" | "link", // "flat" by default
}

Description

type (required) the type of a control, set it to "button"
name (optional) the name of a control
id (optional) the id of a control, must be unique if set, auto-generated if not set
text (optional) the text label of a button
submit (optional) enables the button to send form data to a server, false by default
url (optional) the URL the post request with form data will be sent to.
The property is required if the submit property is set to true

Related Sample: Form. All controls
css (optional) adds style classes to a control
disabled (optional) defines whether a control is enabled (false) or disabled (true), false by default
height (optional) the height of a control, "content" by default
hidden (optional) defines whether a control is hidden, false by default
padding (optional) sets padding between a cell and a border of a button control
width (optional) the width of a control, "content" by default
circle (optional) makes the corners of a button round, false by default
color (optional) defines the color scheme of a button: "danger" | "secondary" | "primary" | "success", "primary" by default
full (optional) extends a button to the full width of a form, false by default
icon (optional) the CSS class of an icon of the button
loading (optional) adds a spinner into a button, false by default
size (optional) defines the size of a button: "small" | "medium", "medium" by default
view (optional) defines the look of a button: "flat" | "link", "flat" by default

Example

<iframe src="https://snippet.dhtmlx.com/qgxzwyfa?mode=js" frameborder="0" class="snippet_iframe" width="100%" height="350"></iframe>

Related article: Button