Read-Only Text Field (Form)

The read-only text field (type="html") displays the specified text using a standard font.

The value of the text property will be HTML-encoded.

To display raw HTML, use the html property (see also Inline HTML Field).

Title Field Properties

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

  • text (string) - the text to be displayed

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

Example

async function modalText() {

  const form = [
    {text: "Details" },
    {name: "Name", id: "name", type: "text"},
  ];

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

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

}