
Grab your gear: The official Sanity swag store
Read Grab your gear: The official Sanity swag storeBased on the Sanity documentation, you're experiencing a common issue with initialValue in Sanity Studio. Here's what's likely happening and how to fix it:
Field-level initialValue only works when creating NEW documents. If you've already created the document (even as a draft), the initial value won't populate. This is the most frequent reason developers think initialValue isn't working.
Solution: Delete any existing drafts/documents and create a completely new document to see the initial value.
The example you're using is valid for Sanity Studio v3:
export default {
name: 'project',
type: 'document',
title: 'Project',
fields: [
{
name: 'title',
title: 'Title',
type: 'string',
initialValue: 'This string'
}
]
}For Sanity Studio v3, the recommended approach is using Initial Value Templates instead of field-level initialValue. These are more powerful and reliable:
// sanity.config.ts
export default defineConfig({
// ... other config
document: {
newDocumentOptions: (prev, context) => {
return [
...prev,
{
id: 'project-with-title',
title: 'Project',
schemaType: 'project',
value: {
title: 'This string'
}
}
]
}
}
})defineField helper for better type safety:import {defineField, defineType} from 'sanity'
export default defineType({
name: 'project',
type: 'document',
fields: [
defineField({
name: 'title',
type: 'string',
initialValue: 'This string'
})
]
})package.json)The key takeaway: initialValue at the field level does work in Sanity v3, but only for brand new documents. For more control and reliability, Initial Value Templates are the modern recommended approach.
Sanity is the developer-first content operating system that gives you complete control. Schema-as-code, GROQ queries, and real-time APIs mean no more workarounds or waiting for deployments. Free to start, scale as you grow.
Content operations
Content backend


The only platform powering content operations
By Industry


Tecovas strengthens their customer connections
Build and Share

Grab your gear: The official Sanity swag store
Read Grab your gear: The official Sanity swag store