Text input
Single-line text — the workhorse of every admin form.
Standalone
Section titled “Standalone”from almasix.orbit.forms import Form, TextInput
form = Form.make("demo").schema([ TextInput.make("title") .label("Title") .placeholder("Shipping Orbit docs") .required() .max_length(200)])In a Resource
Section titled “In a Resource”from almasix.orbit import Resourcefrom almasix.orbit.forms import Form, TextInput
class PostResource(Resource): @classmethod def form(cls, form: Form) -> Form: return form.schema([ TextInput.make("title").required().max_length(200), TextInput.make("slug").helper_text("Used in URLs"), TextInput.make("email").email(), ])Key methods
Section titled “Key methods”.label(...) / .placeholder(...) / .helper_text(...).required() / .rules(...).email() / .password() / .numeric() / .integer() / .tel() / .url().max_length(n) / .min_length(n).default(...) / .live() / .readonly() / .disabled(...) / .visible(...)
Closures work on .label(), .helper_text(), .placeholder(), .visible(), .disabled(), and .required() — see Form closures.
Preview
Section titled “Preview”
