Skip to Content

Forms

Not every piece of information comes from a sensor or an automated system. Sometimes you need a human touch — and that is where the Forms widget comes in. Think of it as your digital clipboard inside IronFlock. Use it whenever you want to capture data manually, such as:

  • Recording scrap counts on the production line
  • Entering readings from an old-school pH sensor
  • Logging inspection notes during a factory walk
Forms widget demo showing a data entry form with dropdown, text fields, checkbox, and date picker, plus a table of submitted records below

How Forms Work

When someone submits a form, the data is stored in a designated table in your app’s database. Each field in the form maps to a column in that table, and all fields are saved together as a new row when the form is submitted.

What you configure in the form widget:

  • A title for the form
  • One or more fields, each with a label, input type, and the table column it should write to
  • Optional validation rules and default values per field
  • Optional texts for the buttons (Button Labels), such as Save instead of Submit, and a page to open after saving (Post-Submit Navigation)

Available field types: dropdown (select from a list), text, number, checkbox, and date/time picker.

Arranging the Fields

By default, every field takes a full row, one below the other. A long form becomes easier to fill in when related fields sit side by side and are grouped under headings:

  • Width: each field can take a full row, three quarters, two thirds, half, a third or a quarter of a row. Fields fill each row from left to right, and a field that no longer fits starts the next row. Set a Default Field Width under Field Layout to give all fields the same width, then change single fields where needed.
  • Start a New Row: the field begins a new row, even if it would still fit next to the previous one.
  • Sections: a field of the type section adds a heading with an optional hint below it. It groups the fields that follow, up to the next section. Its Field Width in Group sizes all of these fields at once, and its Conditional Display shows or hides the whole group, for example settings that only apply to one kind of machine.
  • Density: new forms start Compact, with smaller fields for desktop boards used with a mouse. Choose Comfortable for the larger fields that suit touch screens.

The form adapts to the space it has. On a small tile or a phone, the fields widen step by step until they stack in a single column, so every field stays readable. Minimum Field Width sets how narrow a field may become before that happens.

Where Does the Data Go?

Every form submission adds a new row to the table. This gives you a full history of all entries — nothing is overwritten or lost.

Make sure you configure all required fields so each new row is complete and consistent.

Keeping Track of the Latest State

If you are using forms to track the current state of machines or assets — like the latest inspection result per machine — IronFlock can show you just the newest entry for each item. The app developer enables this by telling the table which columns identify an entity, for example the machine name.

When this is set up, turn on the latest toggle in a widget’s filter settings and the widget shows only the current row per machine or asset. IronFlock determines which row that is every time the widget reads the table, and every new submission replaces the item’s row on the board as it arrives, so a late or corrected submission never leaves the board showing a stale value. The full submission history remains available if you want to review it.

On such a table, a form needs a field for the columns that identify the entity, and otherwise only for the columns it edits. Each submission keeps the current value of every column the form does not write. The fields on the form are always written: an emptied number field clears its column, an emptied text field stores empty text, and a field hidden by a display condition clears its column. A field with a default value writes the default instead of leaving the column empty.

Editing a Record from a Table

To let users open an existing record and change it, combine a table with a form on the same page:

  1. Give the table a column of the type Edit button, bound to the column that identifies the record, such as the machine name, and set its URL Parameter Key, for example edit. Each row then shows a pen icon. A click writes the row’s key into the page URL (?edit=press-1), the same way a filter widget sets its parameter.
  2. Add a form to the same page, turn on its Form Open Button and set Open on URL parameter to the same name. On a board the form shows no button of its own: it opens as a dialog as soon as the URL carries the parameter, and closes again when the user saves or cancels, which removes the parameter from the URL.
  3. Bind each field’s Pre-filled Value to the record’s column, with a filter on the identifying column whose value comes from the edit filter parameter, and the Latest switch on. The field that writes the identifying column is a Hidden Field with the same binding, so the save goes to the same record. As in the previous section, every column the form does not write keeps its value.

The dialog shows a progress bar until the record’s values have arrived. With the latest toggle on, the table shows the saved change the moment it is stored. A bookmarked URL with the parameter opens the dialog right away, and the browser’s back button closes it.

A separate form with its own open button still creates new records. Outside a board, in the widget editor’s preview, a form keeps its button so you can try it out.

Deleting Data

IronFlock uses an append-only approach to deletion as well. Instead of removing a row, a form submits a new entry that marks the record as deleted in the table’s deleted column, a boolean column the app developer adds to the table. There is no special delete button for this: a delete form is a form whose submit button says Delete.

To let users delete a record from a table, with a confirmation:

  1. Give the table a second column of the type Edit button, bound to the column that identifies the record, with the URL Parameter Key delete and the Icon delete.
  2. Add a form to the same page, turn on its Form Open Button, set Open on URL parameter to delete and give it a title such as “Delete this record?”. Under Button Labels, set the Submit Label to Delete and the Cancel Label to Keep, and choose a red Highlight Color.
  3. Give the form exactly two fields, both with Hidden Field on: one that writes the identifying column, its Pre-filled Value bound as in the edit form above but filtered by the delete parameter, and a checkbox that writes the deleted column, with its Default Value on.

A click on a row’s delete icon opens the dialog, and Delete saves the record’s key with deleted set to true. To delete a record on its own detail page instead, put the same form there and set its Post-Submit Navigation to the list page, for example /machines.

Widgets that list the records combine the latest toggle with a filter on the deleted column (deleted is empty or false). A deleted record disappears from the board the moment the entry arrives and remains in the database for history and audit purposes. No view or transform is needed for this; see Soft Deleting Records. To let an edit form restore a deleted record, give it a hidden checkbox on the deleted column whose Default Value is off.

Forms made with a form widget version before 2.0 have the settings Show Delete Button and Delete-Flag Column. Version 2.0 no longer has them: when you move such a form to version 2.0 or later, rebuild its deletion as described here.

Summary

With the Forms widget you get:

  • Easy manual data entry directly from the board
  • Automatic history tracking for every submission
  • Clean patterns for showing current state and hiding deleted records
  • Editing of existing records from a table, in a dialog on the same page

All without leaving your IronFlock board.

Last updated on