I am trying to make a post reference field repeatable in my field group.
I have a relationship created between properties ("lejemål") and renters ("lejere") in a many-to-many relation. Now I want to add a repeatable field, so that I can add multiply entries in my forms.
When I in the custom field for my post relation click the "I need this field to repeat" I get a popup saying that I need a meny-to-many relationship for that to work. It also indicates that I only have a one-to-many relationship at the moment. But thats not right. I have created it as a meny-to-many, please see the image 3.
The fields are added to my forms but when adding a new property I can only select 1 renter, how do I get a repeatable field, so I can add more than 1 relation?
1. image = current state of my relationship between properties("lejemål") and renters("lejere")
2. image = The suggestion I get when clicking the "Preview changes" in the popup.
3. The popup I get when clicking "I need this field to repeat" link.
Best regards
Anders
Dear Anders,
That is expected result.
The many-to-many relationship are different from post reference field:
- The post reference field is based on one-to-many relationship
- You can not setup post reference field as a repeating field
So you will get the message:
need a many-to-many relationship for that to work
For the problem: add multiply entries in my forms.
I suggest you try to follow our document connect many-to-many posts with relationship forms:
https://toolset.com/documentation/post-relationships/how-to-build-front-end-forms-for-connecting-posts/
How to Build Front-End Forms for Connecting Posts