RistmarkStart free

Block

Form control

A tick-box or a labelled blank to write in — the fill-in parts of a printed form, drawn as part of the document.

What it is for

A Form control draws the fill-in parts of a printed form. A checkbox is a small square with its label beside it, shown ticked or empty. A text field is a label followed by a space to write in, either a ruled line or a box. You can leave the space blank for a person to complete by hand, or prefill it from your data.

It is printed content, not an interactive form. It makes marks on the page: there is no fillable PDF field, nothing to click in the finished file, and no electronic signature. A signature line drawn this way is signed by hand on the paper or exported document.

Choose something else for a value that is simply printed next to a name: use Label + value. For running text use a Text block.

Add and edit it

Pick Form control in the Forms group of the block palette, or use the list beside Label + value, which offers Checkbox (a tick-box with its label) and Fill-in line (a label with a ruled blank line beside it and a 30 mm label column). All of them make this block. The side panel calls it "Form control" and lets you switch between the two shapes afterwards with Field type.

Double-click a checkbox's label to edit it in place. Select the checkbox and use its menu (⋮), or right-click, for Toggle checked, which is only offered while Checked is a fixed on/off. On a text field the two halves edit separately: double-click the label side to edit the label, the fill-in side to edit the prefilled value. Everything else is in the side panel, which shows only the settings that apply to the kind of field you picked.

Settings

  • Field type. Checkbox (default) or Text field.
  • Label. The wording that names the field. It can carry data, like {{ $data.invoice.number }}. A long label wraps onto more lines rather than being cut off, and the block grows to match.
  • Fill style (text field). Underline (default) or Box. The writing space is one text line tall either way, so for a taller blank put a Spacer above it or use a ruled form.
  • Prefilled value (text field). Fixed wording or a value from your data. Leave it empty for a blank to complete by hand: the line or box is still drawn.
  • Label width (text field, millimetres; default 30). How much width the label takes before the writing space starts. A checkbox measures its own label against the room beside the box, so this hides for checkboxes.
  • Checked (checkbox). A fixed on/off, the same on every document, unless Bind to data is switched on. Then you type a yes/no expression such as $data.invoice.paid, written without {{ }} brackets, the same way as a block's Visibility condition. The box is ticked only when the expression is true. When it is false, or the data is missing, or the expression is broken, the box prints empty; a broken or missing one is also flagged in the side panel, never silently wrong.
  • Check mark (checkbox). ✓ Check (default) or ✗ Cross. It is always shown for a checkbox, but has nothing to show until the box is ticked.
  • Font size (points; default 11). The tick-box follows it, up to a maximum square of 5 mm.
  • Text colour (default black). Colours the label, the prefilled value, the tick mark, and a ruled fill-in line.
  • Border colour (default black). Colours the tick-box outline, or the box around a writing space. A field drawn as a ruled line takes the text colour instead, so this hides for that shape.

Variations and combinations

Blank signature line. Two text fields with Underline, label width 30: "Signature" and "Date", with a Spacer above each so there is room to sign. The fixture is form-field-1.json. The page shows "Please sign and return one copy.", then 12 mm of space, then "Signature" followed by a ruled line, then 6 mm, then "Date" with its own ruled line. Nothing is typed into them.

Prefilled reference box. A text field with Fill style Box, label "Reference" with width 35 mm, and the value {{ $data.order.reference }}. The fixture is form-field-2.json. With order.reference = "PO-77120" the page shows "Reference" and a box holding "PO-77120". Clear the value and the empty box is still drawn.

Tick "Paid" from a yes/no field. Two checkboxes, "Paid" with Checked bound to $data.invoice.paid and "Disputed" bound to $data.invoice.disputed with Check mark ✗. The fixture is form-field-3.json. With invoice.paid = true and invoice.disputed = false the page shows a ticked box labelled "Paid" and an empty box labelled "Disputed". Flip paid to false and the tick disappears; flip disputed to true and a ✗ appears.

Output differences

  • PDF and web page (HTML). The box, line, tick and label are drawn side by side as laid out.
  • Word (.docx). The pieces are written as separate paragraphs one under another: a checkbox's square becomes an empty bordered paragraph at the full text width, followed by the tick and the label on their own lines; a ruled fill-in line becomes an empty paragraph with a bottom border under the label. They are not interactive Word form controls. If a form matters in Word, check the downloaded file.

Troubleshooting

  • The box is not ticked though the data says yes. The expression is not exactly true: check the path ($data.invoice.paid), that it has no {{ }}, and that the value is a yes/no, not text. The side panel flags a broken expression.
  • Changing Border colour does nothing. The field is drawn as a ruled line, which takes the Text colour.
  • The label is squeezed. Increase Label width for a text field.
  • Not enough room to write. The writing space is one line tall. Add a Spacer above it, or raise the font size.
  • People cannot fill it in on screen. This is a printed form; it is not an interactive field.