Like what we’re doing? Star us on GitHub!

Relationship with Form Plugin

ScriptDroid
last month
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",
      },
    },
image.png
  • jesschow
    Payload Team
    2 weeks 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
Can't find what you're looking for?
Get help straight from the Payload team with an Enterprise License.Learn More