Skip Navigation

[Resolved] Front-end Forms for Editing Content

This support ticket is created 3 years, 3 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
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9: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/Karachi (GMT+05:00)

This topic contains 2 replies, has 2 voices.

Last updated by matthiasI 3 years, 3 months ago.

Assisted by: Waqar.

Author
Posts
#2174893

Tell us what you are trying to do?
Create a Front-end Forms for Editing Content

Is there any documentation that you are following?
https://toolset.com/course-lesson/front-end-forms-for-editing-content/?utm_source=plugin&utm_campaign=forms&utm_medium=gui&utm_term=forms-editing-doc

Is there a similar example that we can see?

What is the link to your site?
hidden link

I have created a template with a form inside to modify the post type "formation"
When I follow the link hidden link
it does not display the form but the post instead.
What should I do ?

Thanks for your help,
Mat

#2175979

Hi Mat,

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

During troubleshooting, I noticed several configuration issues on your website:

1. Your website has two content templates:
- Formation
- Modifier formation

The "Formation" content template contains the regular content to show when the single "Formation" post is showing and the "Modifier formation" content template includes the form "Modifier formation" that can be used to edit a single "Formation" post.

But in the content template settings, the "Modifier formation" content template was wrongly selected for showing these single "Formation" posts. I've changed that and now the "Formation" template will be used for showing the single "Formation" post.
( screenshot: hidden link )

Note: The "Modifier formation" template is not assigned to any post type, because we only want to use it when we need to edit the posts and not when showing the regular content.

2. In the content template "Formation", I've also included a link to edit the post, using the "toolset-edit-post-link" shortcode, as explained in the documentation:
( ref: https://toolset.com/course-lesson/front-end-forms-for-editing-content/#3-insert-link-to-the-content-template-that-displays-the-form )


[toolset-edit-post-link content_template_slug='modifier-formation' target='self']Edit this post[/toolset-edit-post-link]

You can read more about this shortcode at:
https://toolset.com/documentation/programmer-reference/forms/cred-shortcodes/#toolset-edit-post-link

As a result, when someone will visit any single "Formation" post, the regular content will be shown using the "Formation" template.

And when he/she will use the post edit link, the same page will reload, but it will show the edit form using the "Modifier formation" template.

3. Currently, Toolset's content templates are not showing when you visit the single "Formation" post, because, in your active child theme, there is a file "single-formation.php" file which is controlling the content display. For Toolset content templates to work, it is important that WordPress standard "the_content" function is available in the single PHP template file, which is missing from this file.

You can simply fix this by deleting the "single-formation.php", so that templates are controlled by Toolset's content templates and not your custom template file.

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

regards,
Waqar

#2175989

My issue is resolved now. Thank you!