Skip to content
Discussion options

You must be logged in to vote

To be clear, you are wanting to use first as the document title?

No that is not currently possible. What you could do instead is create a top level field i.e. fullName and use a field hook to update that based on name.first and name.last.

Something like this:

{
  slug: 'example-collection',
  admin: {
    useAsTitle: 'fullName',
  },
  fields: [
    {
      admin: {
        hidden: true,
      },
      name: 'fullName',
      type: 'text',
      hooks: {
        beforeChange: [
          ({ siblingData, operation, value }) => {
            if (operation === 'create' || operation === 'update') {
              return `${siblingData.name.first} ${siblingData.name.last}`
            }

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Teelon
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants