Inline HTML Field (Form)

The read-only HTML field (type="html") displays the specified HTML content.

The content of the html will be added to the form as is (to add an HTML-encoded text, see Read-Only Text Field).

Title Field Properties

  • type ("html") - specifies the form field type; optional

  • html (string) - the HTML to be displayed

  • cssClass (string) - additional CSS class that will be applied to the form field; optional

Example

async function modalText() {

  const form = [
    {html: "<b>Details</b>" },
    {name: "Name", id: "name", type: "text"},
  ];

  const data = {
    name: "John Doe"
  };

  const modal = await DayPilot.Modal.form(form, data);
  console.log(modal);

}