Tina Docs
Introduction
Overview
Introduction To TinaCMS
Getting Started
Using the Tina Editor
FAQ
Core Concepts
Content Modeling
Data Fetching
Visual Editing
Querying Content
Overview
Writing custom queries
Editing
Overview
Markdown & MDX
Block-based editing
Single Document Collections
Customizing Tina
Overview
Validation
Custom Field Components
Custom List Rendering
Format and Parse Input
Filename Customization
Before Submit function
Going To Production
Overview
Tina Cloud
Self-Hosted
Drafts
Overview
Draft Fields
Editorial Workflow
Guides
Overview
Framework Guides
Separate Content Repo
Querying Tina Content at Runtime
Internationalization
Migrating From Forestry
Further Reference
Overview
Config
Schema
The "tina" folder
The TinaCMS CLI
Media
Search
Content API
Tina's edit state
The "tinaField" helper
Self-Hosted Components

The format and parse props can be used to customize the value of the form (what is rendered) and the value of the data being saved. See the following example:

// ...fields
{
name: "username",
type: "string",
label: "Username",
ui: {
// is called on every form change but result is stored in data and not in the form value (saved to file but not displayed to the user)
parse: (val?: string)=>val && val.toUpperCase(),
// Is called on every form change and the result is put back into the value of the form (displayed to the user)
format: (val?: string)=> (val ? val.toLowerCase() : ""),
},
},

For this example, as the user types, they will see all lowercase characters. When it is saved, it will be all uppercase characters.

We can also use this to cast inputs to numbers that might have otherwise been saved as strings. See this example for more details.

Product

Showcase
TinaCloud
Introduction
How Tina Works
Roadmap

Resources

Blog
Examples
Support
Media

Whats New
TinaCMS
TinaCloud
Use Cases
Agencies
Documentation
Teams
Jamstack CMS
Benefits
MDX
Markdown
Git
Editorial Workflow
Customization
SEO
Comparisons
TinaCMS vs Storyblok
TinaCMS vs Sanity
TinaCMS vs DecapCMS
TinaCMS vs Contentful
TinaCMS vs Builder.io
TinaCMS vs Strapi
Integrations
Astro
Hugo
NextJS
Jekyll