Skip to content

Checkbox

A boolean with a label beside it — featured, active, “yes I agree,” etc.

from almasix.orbit.forms import Form, Checkbox
form = Form.make("demo").schema([
Checkbox.make("featured").label("Featured on homepage")
])
from almasix.orbit import Resource
from almasix.orbit.forms import Form, Checkbox
class PostResource(Resource):
@classmethod
def form(cls, form: Form) -> Form:
return form.schema([
Checkbox.make("is_published").label("Published"),
Checkbox.make("notify").default(True),
])
  • .label(...) — rendered next to the input
  • .default(True|False)
  • .disabled(...) / .visible(...) / .readonly()
  • .required(...) when the box must be checked

Closures work on .label(), .helper_text(), .placeholder(), .visible(), .disabled(), and .required() — see Form closures.

Orbit form example (light)

Orbit form example (dark)