Fieldline documentation1.x
Your fields

Placeholders and default values

A hint in an empty field, and the value a field starts with, for each type and in each checkout.

Placeholder

A placeholder is a light grey hint shown in an empty field, such as "e.g. GB123456789" in a VAT number field. It isn't an answer: if the customer types nothing, the field stays empty.

  • Text and text area: shown in the classic checkout. The Checkout block has no placeholders for text boxes, so there it doesn't show; put the hint in the label instead if both checkouts need it.
  • Dropdown: the text of the empty first choice, in both checkouts, such as "Choose one". Without one, the classic checkout shows "Select an option".
  • Checkbox: no placeholder.

Default value

A default value is filled in when the checkout opens, and stays unless the customer changes it.

  • Text and text area: any text, such as "Leave at the door".
  • Dropdown: an option's value (the part before the colon), so the dropdown starts on that choice.
  • Checkbox: tick Ticked to start with to have the box ticked. Use it with care for consent boxes, which should usually start unticked.

In the Checkout block, a default fills the field in for the checkout in progress. Orders that were placed without an answer stay without one; the default is never added to them later.

Which to use

Use a placeholder when you want to show the expected shape of an answer without giving one. Use a default when most customers want the same answer and only some will change it, for example "Leave with a neighbour" as delivery instructions, or a dropdown that starts on the most common choice.

Note

A required field with a default value is already filled in, so customers can place the order without touching it. If you need customers to make a choice, leave the default empty.