THE FIELD GUIDE

Troubleshooting

Empty input? NaN? Your script deserves answers.

A value read at startup stays empty

const name = forma.bind("firstName", "value");
forma.on("Click", () => alert(name.value));

A get returns a snapshot. A binding keeps a live reference. Read the ref’s value inside the event.

parseInt returns NaN

Parse the current input, not the ref itself and not an empty startup value:

const age = forma.bind("ageInput", "value");
forma.on("Click", () => {
  const number = Number.parseInt(age.value, 10);
  if (!Number.isFinite(number)) return;
  console.log(number);
});

Timer never fires

Put Tick in the Timer’s script. Enable that Timer by its exact name. interval is a number, such as 1000, not "1000". Bind enabled with .value; do not replace a ref object with a boolean.

Avatar image does not change

Set source, not text. Use a FilePicker’s selectedPath or Choose Image in the inspector. Verify the path exists.

My provider cannot be found

Import the provider file in main.js before component scripts consume it. Module names are exact. Do not call use at the top of an imported helper when main.js has not registered the provider yet. See providers.

I cannot freely move a child

Flow, stack, table, responsive, and shell layouts manage child positions. Dragging reorders or assigns cells. Free-position Panel and GroupBox support X/Y; Dock and Anchor may still constrain the child.

Preview keeps the old script

Save the script and start a fresh Preview. A running Preview owns an isolated snapshot. Saving the .forma project stores applied sources, not unsaved editor drafts or runtime values.

DataGrid rows keep disappearing

Use inspector Columns/Rows for saved starting data. Runtime setters edit only Preview. Arrays returned by get are copies; use set or the grid’s row/cell methods to apply edits.

A property is rejected

Check the component’s Runtime property API table. Inspector fields can use different keys or formats. Numeric strings are not numbers; enums require exact supported values.

Styles ignore inspector changes

Custom CSS overrides inspector appearance. Remove copied declarations from component.css if you want the inspector to control them again. Every selector starts with :host.

Search components, properties, and guides.

↑↓ navigate Enter open Esc close