Skip Navigation

[Resolved] edit post form on separate page

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

Problem:
edit post form on separate page

Solution:
To display the post edit form on a specific page, please find the proposed solution, in this case, with the following reply:
=> https://toolset.com/forums/topic/edit-post-form-on-separate-page/#post-1197647

Relevant Documentation:

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

Last updated by laurencea 5 years, 11 months ago.

Assisted by: Minesh.

Author
Posts
#1195910

Hi, is it possible to display the post edit form on a page other than its own post? I see how to add a form edit link to the loop. but once clicked, it loads the post with the edit form in the content. I'd like the front end edit form, to be its own page.

#1195987

Minesh
Supporter

Languages: English (English )

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

Hello. Thank you for contacting the Toolset support.

Well - can you tell me where exactly you want to construct the post edit link? Is it within the views?

#1196059

Yes in the view list

#1196065

Minesh
Supporter

Languages: English (English )

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

Can you please share the code you are using with the views?

#1196084

[toolset-edit-post-link content_template_slug='edit-partner-ct' target='self']Edit[/toolset-edit-post-link]

#1196494

Minesh
Supporter

Languages: English (English )

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

Ok - what if you try to create the post edit link manually.

Try to follow the following steps:
- Create a new page and add Toolset Edit form to it as given under.
For example:

[cred_form form='your-form-slug' post='[wpv-search-term param='partner_id']']

- Now, within your view, try to link to the newly created page above as given under:

<a href="link-to-your-page/?partner_id="[wpv-post-id]> Edit </a>
#1196849

Thanks, Minesh. with your example, I get message "Form type and post type do not match"

Page with edit post form
hidden link

Page with view
hidden link

Resulting Edit page
hidden link
"Form type and post type do not match"

#1197042

Minesh
Supporter

Languages: English (English )

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

Well - can you share access details so I can check whats going wrong.

*** 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 would additionally need your permission to de- and re-activate Plugins and the Theme, and to change configurations on the site. This is also a reason the backup is really important. If you agree to this, please use the form fields I have enabled below to provide temporary access details (wp-admin and FTP).

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

#1197647

Minesh
Supporter

Languages: English (English )

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

Could you please check now.
=> hidden link

I've added the following code to Toolset's custom code section:

function func_display_partner_edit_form() {
   if(isset($_GET['partner_id'])){
     return do_shortcode("[cred_form form='edit-partner' post='".$_GET['partner_id']."']");
   }else{
     return "no edit post to display.";
   }
}
add_shortcode('display_partner_edit_form', 'func_display_partner_edit_form'); 

=> hidden link

And called the shortcode on the following page:
=> hidden link

[display_partner_edit_form]
#1197649

awesome. Thank you! I could do the same for displaying list of child posts on a separate page, yea?

#1197650

Minesh
Supporter

Languages: English (English )

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

Yes - you just need to add the following link - adjust the page slug where you want to display the form:

<a href="link-to-your-page/?partner_id="[wpv-post-id]> Edit </a>

And you are done 🙂

#1197652

Yea did that. I mean, could you guide me on rendering this view on it's own page?
hidden link

Right now, i just have everything on one page, hidden by user role.
hidden link

If you switch to my user account with a Parter role (laurenceanthony1) and visit the above page, you'll see the Supporters tab.
I'd like for this to be on its own url too. ie. /view-supporters.

#1197653

Minesh
Supporter

Languages: English (English )

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

Well - that's a totally different quetion/issue/problem/howto.

Would you mind to create a new ticket with every question you may have, as per our support policy we entertained only one question per ticket. This will help other users searching on the forum as well as help us to write correct resolution summary to which originally ticket submitted to get help for.

Thank you for understanding.

#1197866
#1198349

Minesh
Supporter

Languages: English (English )

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

Great - would you mind to close this ticket 🙂