Form Logic Designer
Add rules to a PDF form: show, hide, lock or require a field depending on a tick box, a list or what is typed in another field. Free, in your browser.
About This Tool
Form Logic Designer adds rules to a PDF form that make one field answer to another: a line for details that appears when a box is ticked, a field that must be filled in when a list says "Other", a field that stays locked until another has something in it.
The fields of the form are listed, and each rule is one sentence: when a field is ticked, not ticked, equal to a value, different from it, filled in or empty, then another field is shown, hidden, open to changes, locked or required. A rule holds both ways, so a field shown while a box is ticked is hidden while it is not, and the form opens in the state its rules give it. The rules are written into the PDF as one JavaScript function that the fields call when they change. Scripts a field already has are kept, and rules written here before are replaced by the new ones.
Rules run only in PDF programs that run the JavaScript of forms. In a program that does not, the form is simply as it was, with every field showing. A value is compared exactly, capitals included, and for a group of radio buttons a rule can only ask whether a choice has been made. The tool does not create fields: add them with Form Creator first. The file is processed in your browser and is not uploaded.
How to Use
Upload a PDF Form
Add a PDF that already has form fields. If it has none, the page says so: add them with Form Creator first.
Write the Rules
Each rule reads as a sentence. Choose the field it depends on, what is asked of that field, what happens, and the field it happens to; type a value where the rule compares one. "Add a rule" adds another, and the bin removes one.
Write Them into the Form and Download
Click the button that writes the rules into the form, then "Download". Open the form in the PDF program it will be filled in with and try the rules there.
Use Cases
Show a Field Only When It Is Needed
An "Other, please specify" line appears when the reader ticks "Other", and is hidden otherwise.
Require a Field Depending on an Answer
Make the company name required when a list says "Company", and optional when it says "Person".
Agreement First
Keep a name or date field locked until the reader ticks an "I agree" box, and lock it again if the box is unticked.
Frequently Asked Questions
Do I need a PDF with pre-existing fields?
Yes. The tool links fields that are already in the form; it does not create any. If your PDF has none, the page says so. Add them first with Form Creator.
Will this logic run on any PDF reader?
No. The rules are JavaScript, and they run only in PDF programs that run the scripts of forms: Adobe Acrobat, for which such scripts are written, and pdf.js, the viewer Firefox is built on, in which these rules were tried. Many phone apps and simple viewers ignore them, and there every field is shown and can be filled in. Try the form in the program your readers will use.
What happens to scripts the form already has?
They are kept. A script a field already runs when its value changes still runs, after the rules, and its other scripts are not touched. If you write rules into the same form a second time, the new rules take the place of the old ones.
Does this affect paper printing?
A field that a rule has hidden is not printed, and a field that is shown is, just as on the screen. In a program that does not run the rules, every field is printed.

