Skip Navigation

[Resolved] one to one relationship from child to parrent

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

Problem:
How to display parent dropdown select with posts created by current user or post author is current user with CRED form

Solution:
To display parent dropdown select field with posts created by current user or posts author is current user with CRED form, you need to follow the steps shared with the following reply.

You can find proposed solution, in this case, with the following reply:
https://toolset.com/forums/topic/one-to-one-relationship-from-child-to-parrent/#post-901931

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
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10: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/Kolkata (GMT+05:30)

This topic contains 17 replies, has 3 voices.

Last updated by kostasO 5 years, 12 months ago.

Assisted by: Minesh.

Author
Posts
#902192

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

As your original issue is resolved, May I kindly ask you to resolve this ticket. Please feel free to open a new ticket with your each new question.

#902289

Thank you for the soloution.
I will try the querry you sent me
$author_query = array('post_type' => 'target-collection', 'posts_per_page' => '-1','author' => $current_user->ID,);

to test if it returns the collection that it is choosen in the target and i will sen tyou again if I cannot found a soloution to run it 🙂

Thanks a lot again

#902714

Minesh hi,

I am trying to work with the php code you game me in order to read that selected parent field (the collection field) but it does not return the selection that is made. Instead I always get the same result "Array" instead of the selected field in the cred form

the code was
$author_query = array('post_type' => 'target-collection', 'posts_per_page' => '-1','author' => $current_user->ID,);

This ticket is now closed. If you're a Toolset client and need related help, please open a new support ticket.