class JsonForm
constructor()
property editable
This is a boolean property that determines whether the form can be edited. If editable is false, the form is view-only; if editable is true, the form becomes editable.
property model
This property holds the data model used to populate the form. It should in most cases be an object.
property layout
Access the FormLayout of the form.
dom() → Element
Get the DOM of the form. This can be passed to a new dialog as the body, or appended to an element on the webpage.
class FormLayout
This class can not be created, only accessed via JsonForm.layout.
addRow() → FormRow
class FormRow
This class can not be created directly, only via FormLayout.addRow().
append(field) → self
class Field
Common field options:
- label - string: the field label
- path - string: the JSON path in the model for this field
- locked - bool: make field read-only
- nullable - bool: assume null for this value if the field is empty
class TextField
class NumberField
- fixed - int: save the number as a string, with n decimals.
- float - bool: save the number as a float, unrounded.
Note: If neither fixed or float is set, the value will be saved as an integer.