Skip Navigation

[Closed] I Want to Make Front End Post Submission Form With Relationship Custom Post

This support ticket is created 4 years, 8 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
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 6 replies, has 3 voices.

Last updated by Christian Cox 4 years, 8 months ago.

Assisted by: Christian Cox.

Author
Posts
#1568087

Tell us what you are trying to do?
i want to make a front end post submission form in which i can Manage Relationship with other post of my site like i have lyrics and Related to that i have singer post and Lyricist and many other. i want a form in which user can manage relationship with other post
Is there any documentation that you are following?

Is there a similar example that we can see?
no
What is the link to your site?

#1568091

Please Reply Solution as soon as possible

#1568353

Hello, you can manage a one-to-many post relationship in the new child post form or edit child post form. To manage a many-to-many post relationship, you should use a relationship form. We have documentation for relationship forms available here: https://toolset.com/documentation/post-relationships/how-to-build-front-end-forms-for-connecting-posts/

Let me know if you have a specific question or problem related to these forms and I can take a closer look.

#1568427

I have already checked your documentation regarding this but I am not able to achieve this please do it on my admin panel
To get the admin credentials please send me the link for private message

#1568483

Please provide login credentials in the private reply fields here.

#1570005

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hello,

Christian is currently unavailable today but will be back tomorrow to help with assisting with this.

Thanks,
Shane

#1571087

Thanks for providing login credentials here. I am reviewing the content of your site and your previous comments. You said:
"I just want a form where users can submit post in front end with relationship post"

Let's use the Posts Albums many-to-many relationship as an example. From the single Album page, I would like to be able to connect that Album to any existing Post. That is the goal for this exercise. The steps I followed are shown here:

I created a new Relationship Form called "Connect a given Album with any Post". You can find that Form here: hidden link

Following the instructions on the Relationship Form Editor, the next step is to create an editing-mode template and insert the Relationship Form in the template. However, your case is special because Elementor templates are involved. Any time you have Elementor templates and Toolset's Content Templates used together, there will be problems. First I tried using Content Templates, as recommended. I created a new Content Template, "Edit or Connect to Given Posts Albums Relationship Form". You can find the template here: hidden link

I left the template unassigned, and I inserted the Relationship Form. When I inserted the Form, a popup is shown and I have to choose what I want to do. See rel-form-settings.png. In this case, I want to connect a given Album to any Post, and the given Album is the current Album, because we will place this link in the Album template.

Next I edited the single Album template so I can add a link to this new Relationship Form:
hidden link
Using a Text element, I inserted the shortcode for displaying this Relationship Form.

The result was a link that does not work, because Elementor's template overrides Toolset's template and displays the post instead of the Form. So the solution is to place the Relationship Form on a separate Page and link to that Page with URL parameters. I created a Page here: hidden link
This Page contains a Relationship Form shortcode:

[cred-relationship-form form='connect-a-given-album-to-any-post' child_item='[wpv-search-term param="album_id"]']

Note that I have set the Album using a shortcode attribute "album_id". Now we need to set up a link to this Page using the proper URL parameter. To do that, I edited the Elementor Template used to display single Albums:
hidden link
I added the following HTML to link to the new Page containing the Relationship Form:

<a href="/connect-albums-and-posts/?album_id=[wpv-post-id]">Connect [wpv-post-title] to any Post</a>

You can see the link now at any Album post, like this one:
hidden link

If you click the link you will be directed here:
hidden link

Then you can select any Post that is not already connected to this Album, and establish the relationship between these two posts. I connected Filhaal Lyrics to this Album, and then the Relationship Form redirected me to the Album post I was viewing before I went to the Relationship Form: hidden link

This is just one example of how you can use Relationship Forms. If you want to discuss a different specific example, please provide more details about what you want to accomplish.

The topic ‘[Closed] I Want to Make Front End Post Submission Form With Relationship Custom Post’ is closed to new replies.