Custom Form Builder
A visual builder for printable inspection sheets, so a new form is something office staff design and save to FileMaker rather than new code and a redeploy.
An automatic door inspection company files every job as a printed, signed inspection sheet generated from FileMaker. Each sheet was a hand-written Vue page, so every new form needed a developer and a deploy. I designed and built a form builder that describes a sheet as JSON, shows the exact printed output live as you edit, and stores the definition in FileMaker for technicians to fill in and print to PDF.
01
Problem
The five AAADM inspection sheets were roughly 85% copies of each other, and adding a sixth meant another 400-line page, six more components, a new store and a form name wired into four separate places. Only a developer could add or change a form.
02
Approach
Modeled the paper form rather than a general layout language. A typed JSON schema covers page setup, subject columns, header panels, sections of rows, certification, signatures, footer and PDF file name. One renderer draws a definition in three modes, fill, preview and print, so the builder’s live preview is the same component tree the PDF server prints. A hand-written parser validates and repairs every definition before anything renders.
03
Result
The AAADM swinging door sheet, rebuilt purely as a definition, prints a PDF visually indistinguishable from the hand-written page on one landscape Letter page. New inspection sheets are now built, saved to FileMaker and filled in by technicians without touching code.
My role
I designed and built the custom form system end to end, inside an existing Nuxt app that generates PDFs for FileMaker: the schema, the builder, the renderer, the print pipeline and the contracts for the FileMaker scripts.
What the builder does
- Three-column editor: the saved forms on the left, an outline of the form in printed order in the middle, and a live preview of the real printed sheet on the right.
- Paper and layout: paper size, orientation, margins, text size and row heights, with as many sheets per form as needed and columns sized by percentage.
- Row types: compliance marks that cycle through check, X and circled X for each door, ruled text lines, circled Yes / No, checkboxes and spacers. Enter adds the next row and focuses it, since rows are most of the work.
- Sections and comments: titled runs of rows with comments per section, per row or none, and optional sub-columns per door, such as activating and safety sensors.
- Header, certification and sign-off: boxed header panels with styled text and fill-in fields, certification text with its own questions, and signature blocks with signature pads that can stamp the date.
- PDF file names: choose which answers name the generated PDF, such as the facility and work ticket number.
- Try before saving: open the form exactly as a technician will see it, fill it in, then return to the builder.
- Working copies: each form keeps its own unsaved copy, so switching between forms loses nothing and the list shows which ones have unsaved changes.
Under the hood
- One renderer, three modes: filling, previewing and printing share one component tree, so what you build is what prints.
- No breakpoints: the renderer compares its own width to the sheet’s paper width and switches between the printed sheet and a stacked layout with larger touch targets, so a portrait form never prints the phone view.
- Validation as a trust boundary: definitions can be edited by hand in FileMaker and drive a headless Chromium render, so the parser repairs what it can, reports every problem with its location, and refuses a form from a newer schema version rather than printing a compliance sheet with rows missing.
- Safe saves: every save carries the revision it was based on, so two people editing the same form can’t overwrite each other, and a working copy is only dropped once FileMaker confirms the save. A delete waits for FileMaker to answer before the form leaves the list.
- FileMaker Pro and WebDirect: the builder runs in FileMaker Pro over the JavaScript bridge, while technicians fill forms in WebDirect, where that bridge doesn’t exist, through a Data API proxy that only accepts requests carrying a launch token signed by FileMaker.
- Acceptance check: a verify script tests the layout maths against the numbers hardcoded in the hand-written swinging door sheet, so any change that stops the schema reproducing it fails.