#Dynamic fields in content type

4 messages · Page 1 of 1 (latest)

spring abyss
#

I have a contact form where you dynamically can select an amount of users. If you have selected 5 users then the form (my front-end) adds 5x 3 extra fields (name, e-mail, phone). This contact form does a post request to Directus.

Now I have a content type for this, which contains these 3 inputs. But how can you make this dynamic in Directus so that my content type groups per user. Say you have 3 users then make a repeater in my content type of 3x name, email, phone

Thanks!

mossy egretBOT
#

Thanks for posting! This is a community powered server, so you may or may not get an answer based on available help and expertise. To increase your chances of somebody being able to help you, please help us help you making sure you:

  • Adding an explanation of exactly what you're trying to achieve.
  • Adding any and all related code or previous attempts.
  • Describing the exact issue or error you are facing.
  • Posting any screenshots if applicable.
  • Reading through https://stackoverflow.com/help/how-to-ask.

When you're done with this thread, please close it. Thanks! ✨

(If you have a support agreement and need help, please contact the core team via email.)

spring abyss
#

Dynamic fields in content type

#

Got it. Made a content type with a repeater named user which expects my 3 fields.
Then you can pass in the user array containing the fields.