QUESTPIE
Schema

Fields

A field decides three things at once. The column in Postgres, the control in the admin, and the validation on the way in. This page is the table of every type, with a page each for the detail.

View markdown
FieldColumnAdmin control
f.text(255)varchar(255), or text in text modeinput
f.textarea()textmulti-line box
f.email()varchar(255)email input
f.url()varchar(2048)input
f.number()integer, or the size you namenumber input
f.boolean()booleanswitch
f.date()datedate picker
f.datetime()timestamp(3) with time zonedate and time
f.time()time(0), no time zonetime picker
f.select()varchar sized to the longest optionselect
f.object()jsonbnested form
f.json()jsonb, or json if you askcode editor
f.upload()varchar(36) pointing at your assetsfile picker
f.richText()jsonb, or text in markdown modeeditor
f.blocks()jsonbblock canvas

The last two come from @questpie/admin and appear on f only when that module is enabled. Everything above them is core questpie. Blocks has its own page.

Reading the table

The column is what you get in Postgres. Change f.text(255) to f.text(500), run the generator, then push, and the column widens with it. Most types take an argument that moves the column, and each page says which.

The control is what a person sees. You do not pick it. The admin reads the field type and chooses, which is the reason you declare a type rather than a widget.

Any field can be localized. .localized() is declared once on the base field class, so it works on every row of the table rather than a blessed subset.

Lists of one type

There is no f.array(). .array() is a chain method you put on any field, and it turns that field's column into jsonb holding a list.

tags: f.text(50).array(),

Arrays covers what that does to reads, writes and filters.

Temporal values covers what date, datetime and time actually store, and what comes back out.

Relations covers pointing at another table. It is not a field type, it is its own thing.

On this page