Skip Navigation

[Resolved] When making a post relationship field repeatable I run into a problem

This support ticket is created 5 years ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 1 reply, has 2 voices.

Last updated by Luo Yang 5 years ago.

Assisted by: Luo Yang.

Author
Posts
#1512733
Skærmbillede 2020-02-17 kl. 11.36.20.png
Skærmbillede 2020-02-17 kl. 11.33.54.png
Skærmbillede 2020-02-17 kl. 11.33.19.png

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

#1513929

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