Relationship with Form Plugin

default discord avatar
ScriptDroid
7 months ago
5

Hi, in my payload project I use the forms plugin to create dynamic forms in the site, but I want to create a collection with a relation with the form submissions. What can I do?



This is my relation, all works fine except this



    {
      name: "xxx",
      label: "xxx",
      type: "relationship",
      relationTo: "form-submissions",
      hasMany: true,
      admin: {
        description: "xxx",
      },
    },


I also have a global collection using that and works perfectly



 {
      name: "xxx",
      type: "relationship",
      relationTo: "form-submissions",
      required: true,
      admin: {
        description: "xxx",
      },
    },
  • discord user avatar
    jesschow
    Payload Team
    6 months ago

    hi @ScriptDroid - your relationship field looks correct and when I recreated this field it works as expected. Could you share your Field Chapters collection so we can see if anything looks amiss?

Open the post
Continue the discussion in Discord
Like what we're doing?
Star us on GitHub!

Star

Connect with the Payload Community on Discord

Discord

online

Can't find what you're looking for?

Get help straight from the Payload team with an Enterprise License.