Skip Navigation

[Resolved] Can’t Add Relationship Field to Form

This thread is resolved. Here is a description of the problem and solution.

Problem:

I setup a relationship between two post types. When editing a child in the backend of WP I can set the parent just fine. When I'm crafting the form to front-end edit the child post, I cannot figure out how to add the field for the relationship parent picker.

Solution:

It is a known issue of Types plugin 3.2.2, which is fixed in the latest version of version 3.2.3.

You can download it here:

https://toolset.com/download/toolset-types/#changelog

Relevant Documentation:

This support ticket is created 6 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 7 replies, has 2 voices.

Last updated by KentS9937 6 years ago.

Assisted by: Luo Yang.

Author
Posts
#1168980

OK, I'm feeling stupid. I setup a relationship between two post types. When editing a child in the backend of WP I can set the parent just fine. When I'm crafting the form to front-end edit the child post, I cannot figure out how to add the field for the relationship parent picker.

I've looked at the instructions on this page https://toolset.com/documentation/post-relationships/selecting-parent-posts-using-forms-create-child-items/ but I don't have a button called "Add Post Fields". I have "Add Fields" but there's nothing available there for relationship fields. I'm sure I've missed a basic step. Can you point me to the right place to manually add the parent relationship picker field to a form?

#1169000

Additional details for you. The relationship is many-to-many. I'm also unable to create a relationship form. When I visit Relationship Forms the button to create a new one is dimmed and not active. Something is preventing me from creating a relationship field in a form, as well as creating a relationship form. Hmmmm

#1169425
Relationships.JPG

Hello,

This is expected result, the Toolset post form does not support many-to-many relationship yet, it is still in the feature request list:
https://toolset.com/feature-request/?wpv_post_search=Extend+current+Post+Forms+to+allow+Many+To+Many+Connections&wpv_view_count=686737

I suggest you add your vote on it.

And currently, you can try with the relationship form to setup relationships between existed posts, see our document:
https://toolset.com/documentation/post-relationships/how-to-build-front-end-forms-for-connecting-posts/

For the problem:
I'm also unable to create a relationship form. When I visit Relationship Forms the button to create a new one is dimmed and not active

This problem is abnormal, please check these:
1) You are using the latest version of Toolset plugins
2) make sure the there is many-to-many relationship in your website:
Dashboard-> Toolset-> Relationships
See screenshot Relationships.JPG
3) In case it is a compatibility problem, please deactivate other plugins, and switch to wordpress default theme 2019, and test again

#1169815

Thanks for the clarification, from the documentation I was reading I didn't understand many-to-many relationships didn't support the features I was trying to use.

Regarding my inability to create a relationship form. I disabled all plugins except for Toolset, changed to 2019 theme, I also enabled debugging. It's still not working. I checked an there's nothing in the debug log file. Nothing in the PHP error log either.

What would you suggest to further debug my problem?

#1170068

Please provide database dump file(ZIP file) of your website, I need to test and debug it in my localhost, thanks
https://toolset.com/faq/provide-supporters-copy-site/

#1171084

Thanks for the details, I am downloading the files, will update here if there is anything found

#1171085
relationship-form3.JPG

Here is what I found, it is a known issue of Types plugin 3.2.2, which is fixed in the latest version of version 3.2.3.
You can download it here:
https://toolset.com/download/toolset-types/#changelog

I have tied it with your database dump file, it works fine, see screenshot relationship-form3.JPG

#1171244

Thanks for your help. That fixed it for me.