Skip Navigation

[Resolved] All in one Editing & Display

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

Problem: I would like to create a design where posts are listed in a View and editable on the same page.

Solution:
You can insert the "Add New" Form on the same page as a View of posts. You can add a link that says "Add New Post", and scroll to the Form when someone clicks that link. Showing and hiding the Add New Form will require custom CSS and JavaScript, but it can be done.

The Edit Form isn't easily implemented like this. You would have to place the Edit Post Form in the View loop, and that isn't the recommended way to add Edit Post Forms. You can try it, but some features of Forms, like AJAX submission and custom validation, may not be fully functional in a loop. Again, custom CSS and JavaScript would be required to show and hide individual Forms when links are clicked.

Relevant Documentation:
https://toolset.com/documentation/getting-started-with-toolset/publish-content-from-the-front-end/forms-for-editing/

https://toolset.com/documentation/getting-started-with-toolset/publish-content-from-the-front-end/building-forms-for-editing-when-using-layouts/

This support ticket is created 6 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
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 4 replies, has 2 voices.

Last updated by SatinS5964 6 years ago.

Assisted by: Christian Cox.

Author
Posts
#1139050
Picture3.png
Picture2.png
Picture1.png

I want to be able to display the list of all my posts. Also I want the ability to Add New & Edit Existing posts. The images below show how I would possibly lay this out.

Is this possible to do with Toolset? Or do I need to create separate pages for Add new and Edit?

#1139780

Hi, some of this is possible in Toolset and some is not so possible. You can insert the "Add New" Form on the same page as a View of posts. That's no problem. You can add a link that says "Add New Post", and scroll to the Form when someone clicks that link. Also no problem. Showing and hiding the Add New Form will require custom CSS and JavaScript, but it can be done.

The Edit Form isn't easily implemented like this. You would have to place the Edit Post Form in the View loop, and that isn't the recommended way to add Edit Post Forms. You can try it, but some features of Forms, like AJAX submission and custom validation, may not be fully functional in a loop. Again, custom CSS and JavaScript would be required to show and hide individual Forms when links are clicked.

I could also give you some advice about how to set up custom redirects if necessary to help simplify the edit process if you decide that editing on a separate page is necessary. Let me know how you would like to proceed.

#1140629

Thanks Christian,

I would like to avoid Custom CSS & Javascript.

Could you show me the custom redirects option?

Thanks.

#1141361

It depends on where you place this list (View) of posts. Let's say you create a custom Page called "My active posts" and insert the View of posts in this Page. Then you create a second custom Page called "Add new post" and insert the New Post Form in this Page. In the settings for the New Post Form, you can select the "My active posts" Page for "what to show after the Form is submitted". The redirect will happen automatically. Similarly with the Edit Post Form, you can select the "My active posts" Page to display after the Form is submitted.

Editing posts without Toolset Layouts active:
https://toolset.com/documentation/getting-started-with-toolset/publish-content-from-the-front-end/forms-for-editing/

Editing posts with Toolset Layouts active:
https://toolset.com/documentation/getting-started-with-toolset/publish-content-from-the-front-end/building-forms-for-editing-when-using-layouts/

It gets more complicated if the Page containing the View of posts is on a dynamic URL. For instance, let's say you have a parent post type called "Books" and you want to display a View of child posts on each Book post. In this case, the redirect URL isn't always the same each time the Form is submitted - it could be any Book. You'll need some custom code using the Forms API. I can help you with this if necessary, but your description seemed to be okay for the simpler option above.

#1146056

My issue is resolved now. Thank you!