Automattic / Automattic/cortext
Add forms for creating collection rows
- Dominant language
- JavaScript
- Stars
- 51
- Forks
- 2
- Avg merge
- 3h 12m
- Merged PRs (30d)
- 8
Description
## Goal
Opening a collection and adding a row works for people already using Cortext. Someone who only needs to submit information should not have to learn the workspace first.
Let a collection expose a form based on its schema. The form should work inside the workspace and, when access allows it, as a public submission page.
## Tasks
- [ ] Add form configuration to a collection, including the fields shown, their order, labels, helper text, and whether they are required.
- [ ] Let the form owner include editable fields and leave computed or hidden fields out.
- [ ] Render the form inside the workspace and provide a preview before enabling a published version.
- [ ] Validate submitted values with the collection's field rules and create one regular collection item for each successful submission.
- [ ] Respect the collection's sharing state and never expose existing rows or hidden fields. Tell the submitter whether the form was accepted and what went wrong when it was not.
## Acceptance criteria
- A collection owner can configure a form without changing the collection schema.
- Required fields and typed values are validated before submission.
- A successful submission creates a row in the intended collection with the entered values.
- An internal form is available to workspace users with access to the collection.
- A published form only accepts submissions when the collection and form configuration allow it, and it does not reveal existing collection data.
Contributor guide
Research direction
No files, tests, or entry points are named. Start by mapping the collection schema, workspace form rendering, sharing permissions, and submission endpoints; done means configuration, validation, internal and permitted public submission, row creation, preview, and safe error responses all meet the acceptance criteria.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- api, full-stack
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Active
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100