I believe I'm following the docs properly, and I'm getting this error.
Here's the field schema:
const fields: Field[] = [
{
type: "row",
fields: [
{
name: "name",
label: "Name (lowercase, no special characters)",
required: true,
type: "text",
},
{
name: "label",
type: "text",
},
],
},
{
type: "row",
fields: [
{
name: "width",
type: "number",
},
{
name: "defaultValue",
type: "text",
},
],
},
{
name: "options",
type: "array",
fields: [
{
type: "row",
fields: [
{
name: "label",
type: "text",
},
{
name: "value",
type: "text",
},
],
},
],
},
];
Here's how I'm using it with the plugin
Fixed, Basically the type for multiselect should be a Block, meaning I was missing the slug proerty
@hyprsonic.dev Ahh yea good catch. That is a
Partial
type so all required fields become optional. We need to explicitly maintain the requirement of this property—I just opened up a ticket in the plugin repo to improve this
https://github.com/payloadcms/plugin-form-builder/issues/34.
Custom Field Types in Form Builder Plugin
Star
Discord
online
Get help straight from the Payload team with an Enterprise License.