Field
Represents a single interactive or presentational unit within a Joyfill document.
A Field is a high-level abstraction used by the Joyfill SDK to define items like text inputs, dropdowns, signatures, barcodes, and other UI elements that can be rendered, edited, validated, and mapped to underlying data. All concrete field types extend this interface and may also extend a more specific component interface (for example, TextField extends joyfill.text.TextComponent) that defines the data model and UI contract for that field type.
Common capabilities inherited by all fields:
Component: general component features shared across the system.
Hideable: ability to be shown or hidden based on logic or user actions.
Mappable: ability to serialize/deserialize to and from a map structure for persistence.
Behavior and state:
A field can be programmatically disabled via disabled.
Visibility can be controlled statically via initialHiddenState and dynamically via logic.
Formulas in formulas can compute values based on other fields.
Optional tip can provide contextual guidance to end users.
Arbitrary metadata can store custom, implementation-specific information.
Implementations should ensure that identifiers are unique within a document and that any attached FieldLogic or formulas do not create unresolvable circular dependencies.
See also concrete field types extending this interface:
Inheritors
Properties
Collection of formulas applied to this field. Order may determine execution precedence.
Unique key that identifies this field within a document. Must be stable across updates.
Whether the field starts hidden before any logic evaluation occurs.
Optional FieldLogic describing visibility logic for the field