Hi,
I'm trying to make it so when I select and option in the select field, that field is used as the title for the page.
This is what my code looks like so far:
const Page: CollectionConfig = {
slug: "page",
admin: {
useAsTitle: "title",
},
auth: false,
fields: [
{
name: "pageType",
label: "Page Type",
type: "select",
options: [
{
label: "Home",
value: "home",
},
{
label: "Location",
value: "location",
},
{
label: "Contact",
value: "contact",
},
],
},
How do I make it so when, for example, I select "Home", that's what gets set for the title?