On this page
Create and edit records
Save, update and delete posts from your theme.
Before you begin: Manage account settings.
Create a Post
Use createPost for new posts.
Reference excerpt: use this with the page, variables and functions described in this guide. Try a complete example →
Options:
| Option | Required | Purpose |
|---|---|---|
type | yes | FRL post type, such as products. |
post | yes | Post data to validate and store. |
If post contains File or Blob values at any depth, Frontbacked uploads each file with a resumable flow and saves the post as JSON with file metadata. File bytes are not included in the post JSON body.
Track upload progress with onUploadProgress:
Reference excerpt: use this with the page, variables and functions described in this guide. Try a complete example →
Use the Upload File guide for nested files, progress shape, and Frontbacked.uploads.resume().
Post IDs are generated by Frontbacked. Theme code cannot supply a custom ID when creating a post. If you need to copy the generated post ID into a normal field on the same post, set that field to the exact string "$id" on create; Frontbacked replaces it with the generated ID before storing the post.
Frontbacked.uploadPost(...) remains available as a compatibility alias for Frontbacked.createPost(...).
Update a Post
Use updatePost for existing posts.
Reference excerpt: use this with the page, variables and functions described in this guide. Try a complete example →
Options:
| Option | Required | Purpose |
|---|---|---|
id | yes | Existing post id. |
type | no | Post type when Frontbacked needs it. |
post | yes | Patch or replacement data. |
merge | no | Defaults to true. When true, Frontbacked can merge the submitted fields with the stored post before validation. |
Frontbacked still runs FRL on the final post. Use strict schemas, immutable, and editableIf in FRL to protect fields that must not change through merged updates.
Delete a Post
Reference excerpt: use this with the page, variables and functions described in this guide. Try a complete example →
Frontbacked runs the post type's allow delete rule before deleting.
Continue with Submit a record form.