Skip to content
← All guides
Tutorials6 min read

Forms, validation and file uploads

By The Vorx Team

Forms, validation and file uploads

Forms are where most apps meet real users, and where messy data usually gets in. A form worth shipping captures the right fields, catches mistakes before they save, and handles the attachment somebody inevitably needs to send you.

Describe the form and its fields

Tell Vorx what the form is for and which fields it needs. Being explicit about the kind of each field helps it pick the right input and store the value correctly.

Add a job application form with full name, email, phone, role applied for as a dropdown, and a short cover note.

Vorx builds the form, puts it on a page, and connects it to the data model so submissions are saved as records you can browse later.

Add validation rules

Good validation stops bad data at the door. Describe the rules in plain language and Vorx applies them to the right fields.

  • Mark which fields are required
  • Check that email addresses and phone numbers are well formed
  • Set minimum and maximum lengths on text fields
  • Restrict dropdowns to a fixed set of options

Make email and role required, validate the email format, and limit the cover note to 500 characters.

Show helpful error messages

Validation only helps if people understand what went wrong. Ask for clear inline messages next to the field that failed, rather than one generic warning at the top.

Show the error under each field, and disable the submit button until the form is valid.

Visible labels matter here too — placeholder text that vanishes as you type leaves people guessing what a half-filled field was for.

Accept file uploads

Plenty of forms need an attachment: a CV, a photo, a receipt. Describe what it should accept and Vorx adds storage along with the upload control.

Add a CV upload that accepts PDF and Word files up to 10 MB, and require it before the form can be submitted.

Set that size limit deliberately. Without one, the first person to upload a 200 MB video finds out for you. Uploaded files get URLs scoped to your app and follow the same per-user rules as the record they're attached to, so people only reach their own. Ask for "a preview thumbnail for image uploads" if you're collecting photos, and find the files themselves under Settings → Cloud → Storage.

Confirm and review submissions

After someone submits, they should know it worked — and you need somewhere to read what came in.

  • Show a success message and clear the form after submit
  • Send new submissions to a list you can sort and filter
  • Let teammates open a submission to see every field and file
  • Email the team when one arrives, if it's the kind of form somebody must action

Test it like a user, not like an author

Fill the form in wrong on purpose. Submit it empty, put nonsense in the email field, attach a file that's too big. The error paths are the part you wrote fastest and the part your users hit hardest.

Then check the record actually landed under Settings → Cloud → Database — the fastest way to confirm a form saved what you thought it did, and to clear your test entries out before you publish.

In the docs: Files and storage and Your data model.

Ready to build something?

Turn your next idea into a working app. Your first app is free, no card required.