A box the reader ticks

Add a tick box: accepting terms, choosing an option, with the mark you pick and the value the form reports.

Summary

The little square you tick on screen, the one beside “I accept the terms” or “I would like the newsletter”. On a click the mark appears: a tick, a cross, a circle, a diamond or a filled square, as you prefer. You can have it start already ticked. And the word it reports once ticked is yours to choose, which helps when the answer travels on to another program.

Technically

Asked for with "type": "check_box"

The box is a /Widget annotation and an /FT /Btn field with two appearance states, /Off and the on state, laid over what the other items drew; /AS says which is shown, the border gives the box its visible outline and the background its colour. The starting state, /V, and the state a reset restores, /DV, are said separately: a box may start clear and become ticked on a reset. The reported value is the on state's name, what submitting the form sends; absent, it is Yes. The mark shown is picked among five symbols; absent, it is a tick for a box and a disc for a radio button.

Request schema

Required keys: name, a string; rect. Optional keys of the box itself: checked, a boolean at false, the starting state; checked_by_default, a boolean at false, the state a reset restores; symbol, one of check, cross, circle, diamond or square (absent: the tick); export_value, the string reported when the box is ticked (absent: Yes). Optional keys shared by every field: read_only, required, no_export, booleans at false; background; border (a required width, a color in light, a style); tooltip and description, strings, absent writing no such entry; mapping_name, a string, the name a submitted form reports the answer under; flags, the flag word described on the text field page, absent printing the box and saying nothing else; triggers, one action per moment, the ten of them listed on the text field page; pages, default empty; relative_to. Cross refusal: a CMYK or named-space colour in border.color.

A whole request that creates a PDF

{
  "items": [
    {
      "type": "check_box",
      "name": "terms",
      "symbol": "check",
      "rect": {"llx": 72, "lly": 700, "urx": 86, "ury": 714},
      "border": {"width": 0.75}
    }
  ]
}

The line that sends it, in three languages

Form fields

A field the reader types into A list the reader picks from Several buttons, one answer The place kept for a signature A button the reader presses

Where to go next

Every JSON key of a request, in one page The other twenty-two things you can draw

See the prices See the examples