Skip Navigation

[Resolved] Adding Toolset based post edit form in Elementor powered site

This support ticket is created 5 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
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+00:00)

This topic contains 4 replies, has 2 voices.

Last updated by manishB-2 5 years ago.

Assisted by: Nigel.

Author
Posts
#1365995

Hey Guys,
I am really stuck in one of my main problem. I am trying to let users edit their posts which they have previously added in my website. And I wanna show the edit link in A View that displays all the posts submitted by the user. And I am really confused how it works. Because I tried all possible ways but it didn't work out. And If i use Toolset layout then it conflicts with my Elementor templates which I never wanna do. So i immediately disabled the Layouts.

I am attaching a video URL. So please watch this video and help me out in a video tutorial. I can also provide you access to my site so that you can help me out.

hidden link

#1366035

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Hi Manish

If you are using Elementor then, that's right, you won't want to use Layouts at the same time, and can disable it.

Then for displaying edit post links, you need

- an edit form to edit posts of that type
- to insert this edit form into a Views template at Toolset > Content Template. The template doesn't get assigned to any content type, it's just a container for the form, but is required
- in the output of your View use the Toolset Forms button to insert the Edit post link, specifying the content template you just created as a container for the form.

That's essentially it. You can read the documentation about what's involved here: https://toolset.com/documentation/getting-started-with-toolset/publish-content-from-the-front-end/forms-for-editing/

#1366527

Hi Nigel,
I think you didn't watch my loom video that demonstrate the exact issue. By the way. I am gonna mention everything again for you.

I did follow the same shared documentation and created a post edit form, created a content template, added form edit link on the same view where I want to let the users see all their submitted posts. But when somebody clicks in that form edit link then it redirects to same post page where post contents display and it simply adds a new block for "Edit Post form" in that post page and let people edit the post. But I want this form to be displayed in a separate page other than single post page. Because in a separate page users will not get confused from so many existing contents. and in separate page, only form will make the layout clean and user-friendly.

So this is the only issue I wanna get help with.

#1366599

Hi Nigel,
I got my issue sorted out after gathering multiple examples around your forum and putting them together after making some tweeks.

So here is the code. that I personally used.

So very first step will be to create a post edit form using post forms in toolset and then follow below steps:

1: Go to your Toolset settings >> Custom Code & Add Below function with your own form slug

function func_display_post_edit_form() {
   if(isset($_GET['post_id'])){
     return do_shortcode("[cred_form form='your_edit_form_slug_here' post='".$_GET['post_id']."']");
   }else{
     return "No Posts found to Edit Or Update";
   }
}
add_shortcode('display_post_edit_form', 'func_display_post_edit_form'); 

2: Now Go to your newly created page where you want to display the post edit form and add a shortcode created by above mentioned function:

[display_post_edit_form]

3: Go to your view and Add a custom link that will redirect users to separate post edit form page instead of default post page with edit form

<a href="your-edit-form-page-slug/?post_id=[wpv-post-id]"> Edit </a>

So this is the best way instead of creating a content template or layout and do other messy stuff.

Thank you

#1366855

My issue is resolved now. Thank you!