Value presets

A value preset is a named set of answers: a client's name, their reference, their contact, saved together under the name you know them by. At the deploy prompt you pick the preset from a pop-up and the fields fill themselves.

What a preset matches

A preset stores its values against placeholder keys, not against a template. A preset with a value for client_name fills {{client_name}} in any template that asks for it, whether that is the one you had in mind when you saved it or one you built afterwards.

It does not have to cover a whole template either. A preset fills the fields whose keys it recognises and leaves the rest as they were, so a preset holding a client's details still works in a template that also asks for a project name.

Making one

Presets live in Globals ▸ Values, in the sidebar beside Library and Settings.

Give the preset a name first. That name is what the pop-up shows at deploy time, so name it after the thing rather than the template: "Acme", not "Acme project folder". Then add a row for each value, with the placeholder's key on the left and the value on the right. Beside Add Value, Prefab lists the keys your templates already define, so you can add one without typing it out.

The Values tab of the Globals screen, with a preset's name and its key and value rows
The Values tab of the Globals screen, with a preset's name and its key and value rows
The panel on the right says how many templates the preset currently matches.

Edits save as you type. A half-finished preset is a normal thing to have: a row with an empty value is kept rather than discarded, so you can come back to it, and it fills nothing at the prompt in the meantime.

The one thing a preset cannot hold is a built-in. {{date}}, {{year}}, {{author}} and {{folder}} are worked out at deploy time, and a row for one of them is dropped when the preset is saved.

Deleting a preset removes only the preset. Templates keep their own default values.

Applying one

Once you have saved a preset, the deploy prompt grows a Preset pop-up above the fields, starting on "Choose a preset…". Choosing one fills every field the preset has a value for and leaves the rest untouched. The fields stay editable afterwards, so a preset is a starting point rather than a commitment.

The deploy prompt with a Preset pop-up button above the placeholder fields
The deploy prompt with a Preset pop-up button above the placeholder fields
The pop-up appears once you have saved a preset, and lists them by name.
Presets apply at the prompt, and only there

A deploy that does not prompt - a link carrying prompt=0, for instance - uses each placeholder's default value instead, so scripted deploys stay predictable. See Deploy links.

Remembered values

Presets are for the answers you keep on purpose. Prefab also keeps the ones you did not: after a deploy that asked you for values, it remembers what you typed for that template and offers it back the next time you create from the same one.

A remembered value beats the placeholder's default, on the reasoning that most redeploys are the same project or its near neighbour. Built-in placeholders are never remembered, and neither are fields you left empty. Remembering applies to the prompt alone, so a silent deploy still uses the template's own defaults.

Clearing what Prefab remembers

Remembered values are things you typed: client names, matter numbers, project titles. Clear Remembered, in the panel on the right of Globals ▸ Values, throws all of them away in one go. Templates go back to their own defaults the next time you create from them, and saved presets are kept. The button appears only when there is something to clear.

Which value wins

Three things can put a value into a field at the deploy prompt. In order:

  1. A preset you choose. It overwrites the field the moment you pick it from the pop-up.
  2. What you typed last time. This pre-fills the field as the prompt opens, for this template.
  3. The default value. Used when nothing was remembered, and on any deploy that does not prompt.

The default can come from the template's own placeholder or, where the template writes a key it does not define, from a global placeholder. Either way, a preset you choose at the prompt wins over it.