[Resolved] Can't add a link to edit relationship form template

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.

This topic contains 5 replies, has 2 voices.

Last updated by Michelle Dodd 1 month ago.

Assigned support staff: Waqar.


Tell us what you are trying to do?
I have a template displaying the single Health Center Controlled Network (HCCNs) CPT, with several many-to-many relationships with data in the intermediary relationship posts. The relationships are different types of electronic health records systems, in with each relationship contains several pieces of data.

For this example I'll use the EHR relationship.

1. I want to add a *link* (Manage EHRs Link) for the user to add a new EHR relationship with intermediary data
-- When I add the link into a "Fields and Text" block with other text in the Single HCCN Template there is an error and the block where I add it cannot display correctly. If it's in its own "Fields and Text" block, it simply adds the text "tiny_mce_marker".
-- The link I'm trying to add is to a template in which I added the relationship form, embedded with the "Add new relationship" option selected, and when I embed the link I also select Add new.

2. I want to add a *link* for the user to EDIT the relationships w/intermediary data
-- I've created a template and embedded the the EHR relationship form, with Edit as the option
-- When I try to add the link to the Manage EHR form template, it does not give me the option to Edit, only Add.

In both cases, I can simply embed the form into the Single HCCN template, but I don't want to embed the form, I want to embed a link to it. I'm trying to embed the form into a view created by the block editor right in the Single HCCN template

I'm using the block editor, (changing everything over from Views) which seems to only partially be supported in your documentation. The documentation is fragmentary and confusing. I've exhausted every variation of things to try.

Is there any documentation that you are following?


What is the link to your site?

hidden link
-- See the Electronic Health Records Systems section - the loop contains the two EHRs on the right side,


I see a full day for Waqar has gone by, could you please assign to someone else?



Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hi Michelle,

Thank you for contacting us and I'd be happy to assist.

I tried to view the page that you've shared, but it seems to be password protected.

In order to reproduce this on my test website and suggest the best way forward, I'll need to see how these components are set up in the admin area.

Can you please share temporary admin login details in reply to this message?

Note: Your next reply will be private and though no changes will be made on your website, please make a complete backup copy, before sharing the access details.



I'm also running into a problem now where the Single HCCN template will no longer Update - the button remains unclickable after making changes.

New threads created by Waqar and linked to this one are listed below:




Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hi Michelle,

Thank you for sharing the admin access.

I've performed some tests on my website, with a similar setup, and here are my findings:

1. Adding new relationship entry:

As explained in the documentation ( ref: https://toolset.com/documentation/post-relationships/how-to-build-front-end-forms-for-connecting-posts/ ) and in the information windows when adding relationship form or their links ( example screenshot: hidden link ), when we need to create a new post-relationship using a relationship form, the form needs to be placed on a new page ( and not in a content template ).

I created a new page named "Add new EHR" on my website and inserted the Form block with "Connect between any EHR and a HCCN as an EHRs", while selecting the relationship form "Manage EHRs".

Next, in the "Single HCCN" content template, I inserted the link to that newly created page through the "wpv-post-link" shortcode
( ref: https://toolset.com/documentation/user-guides/views/views-shortcodes/#wpv-post-link )

[wpv-post-link item="14"]

Note: Please replace 14 with the actual page ID of this new page on your website.

As a result, when the user clicks this link, he/she is taken to this new "Add new EHR" page where the form is shown to create a new connection.

2. Editing existing relationship entry:

This part is challenging because the interface to add the link to the form edit content template, expects to be inserted into a view that shows "HCCNs" posts, where a post-relationship query filter with respect to "EHRs" posts, exists.

But in your "Single HCCN" content template, you need the link inside a view that lists "EHR Relationships Intermediary Posts" posts.

In this case, you can generate the link to edit the content template for the relationship form manually and this is the expected format:


Where 123 should be the ID of the content template, in which you have placed the relationship form.

This means that in your view for the "EHR Relationships Intermediary Posts" posts, you can generate this link by adding the following code in a "Fields and Text" block:

<a class="cred-edit-relationship" href="[wpv-post-url]?cred_action=edit_current&content-template-id=1795">Edit this EHRs</a>

Note: The "1795" is the ID of the content template "Manage EHRs" on your website.

I hope this helps and please let me know if you need any further assistance around this.

As for the issue with updating the "Single HCCN" content template, I'm going to split it into a separate ticket and will reply to it, shortly.



My issue is resolved now. Thank you!