Skip Navigation

[Resolved] Connect new post to two parent posts using crd form

This support ticket is created 4 years, 10 months 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 5 replies, has 2 voices.

Last updated by nabils 4 years, 10 months ago.

Assisted by: Minesh.

Author
Posts
#1479309

Tell us what you are trying to do?
Hi,

I have 4 post types tenant, contact, rental and communication.
Tenant is parent of contact and also the parent of rental. The contact is the parent of communication. I want to add a relationship between rental and communication that rental is parent of communication at the same time when I am creating the communication.
Can I pass the rental id with the contact id when creating child communication form?

#1480143

Minesh
Supporter

Languages: English (English )

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

Hello. Thank you for contacting the Toolset support.

I would like to know when you create a new communication post how you would determine to what rental (parent) post you want to link the newly created communication post?

#1480183

Currently in rental page I display the tenant(parent) of rental. Also, I am displaying all contacts(children) related to tenant. When I click on one of the contacts I will go to content template of contact and in this page I have a link to create new communication.

when I click on one of the contacts I want to pass the rental id and also when I create the new communication I pass both the contact id and the rental id. Is this possible?

#1480673

Minesh
Supporter

Languages: English (English )

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

But what rental ID you want to pass when you create the contact?

Can you please share the link where I can see the link to add new contact and once I review your setup I will get back to you.

*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.

I have set the next reply to private which means only you and I have access to it.

#1482779

Minesh
Supporter

Languages: English (English )

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

With the view that displays the contact belongs to current rental page:
=> hidden link

I've changed the following line of code from:

<td> [wpv-post-link]  </td>

To

<td><a href="[wpv-post-url]?parent_rental_id=[wpv-post-id item='$current_page']"> [wpv-post-title] </a> </td>

this will allow use to pass the parent_rental_id.

With the folowing Layout:
=> hidden link
I've replaced the Add Communication link that is added using the following shortcode:

[cred_child_link_form form='1538' parent_id='-1' text='Add communication' target='_self']

With

<a href="/add-communication/?parent_tenant-contact_id=[wpv-post-id]&parent_rental_id=[wpv-search-term param='parent_rental_id']" target="_self">Add communication</a>

Now, when you submit the form to add new communication, you will have both contact and rental ID available:
=> hidden link

#1484149

My issue is resolved now. Thank you!