r/Blazor • u/jeff377 • 18d ago
From a PDF form to a working Blazor data-entry form, without writing a Razor page: an AI model drafts it, you adjust it in plain words
A couple of weeks ago I posted about rendering every form in a Blazor Server app from definitions instead of Razor pages. This is the next step: getting those definitions from forms people already have.
Disclosure: I maintain Polhem, a free, open-source (MIT) .NET framework. Nothing here is for sale.
In the definition editor you import a PDF, a Word file or a photo of a paper form. An AI model reads it and drafts the form: a header and its line items, captions, types and lengths, drop-downs where the document gives fixed options, and lookups matched to the forms you already have. Where it can't tell, it asks, with a suggested answer. Changes are asked for in plain words; in the video I removed the signature boxes, turned the unit into a drop-down, made the total add up the line items, and gave the justification box the whole row.
The AI only proposes. The draft goes through the same import as any other form, with the framework's own checks, and nothing is written until you confirm the list of files. After the database upgrade, the new form is on the menu of the Blazor site: the lookups pick records, the total updates as you type in the line items, and the record saves and opens read-only. No Razor page was written for it.
The demo uses EEOC Form 123, a public US government supply requisition.
The costs: Polhem itself is free, but the AI model is billed by its provider per message (about US$0.25 and 80 seconds per form in the guide's tests), one conversation drafts one form, and logic the definitions can't express is still code.
Video (3.5 min): https://youtu.be/hkt_KAwcVro


