Skip Navigation

[Resolved] Trouble viewing edit content form

This support ticket is created 7 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
- 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/Hong_Kong (GMT+08:00)

This topic contains 13 replies, has 2 voices.

Last updated by nigelp 7 years, 7 months ago.

Assisted by: Luo Yang.

Author
Posts
#427134

Hi
I'm sure I'm missing something really basic here, but just cant see it.

I have created a custom post type - Obituaries.
I have a layout which displays the obituary ands I have two forms created by auto-generate form - Add Obituary and Edit Obituary.
Add Obituary works fine.

I want an edit page basically.
If I add the Edit Obituary form at the bottom of the Obituary layout as a Post Cred Form it is visible underneath the Obituary - which proves I guess the form works but obviously dont want both visible.

So instead I have added the edit shortcode in a Visual Editor Cell as below
[cred_link_form form='46' form_name='Edit Obituary' text='Edit %TITLE%' target='_self']
However the page just refreshes and doesnt show the edit form

Any ideas how to troubleshoot this?

#427138

I forgot to add that if I create a page - edit obituary and just add the edit form the page is blank - but assume this is becaus ethe obituary to be edited has not been parsed

#427266

Dear nigel,

The CRED form for editing post is using filter hook the_content to render the form, if you need display the in the area of content, I suggest you create another new page, see the solution in another similar thread:
https://toolset.com/forums/topic/how-to-apply-layout-to-cred-edit-form/#post-278461

#428612

Hi
Thanks for this - I can see that it parses the post id.
This is the link I have on my 'Obituary' page
<a href="[wpv-post-url id=162]?post_ids=[wpv-post-id]">Edit</a></p>

id 162 is the page id of an Edit Obituary page which has a layout only displaying an Edit Obituary cred form.
However the page is blank.

Conversely if I use my orginal link on the obituary page
[cred_link_form form='46' form_name='Edit Obituary' text='Edit %TITLE%' target='_self']
it now displays the edit form now I have upgraded my plugins (it didnt show before) However it renders the obituary underneath is well.

I simply want to only see the Obituary or the edit form at any one time

#428615
obitoutput.png

The functionality works fine with an edit profile form on my account page
This layout is constructed all within one visual cell as per the cred tutorial.
I tried this approach with the edit post content form above but still output the fields underneath the form

Hope this makes sense

I have attached a screenshot of my obituary page after clicking edit. as you can see it renders both edit form and content.

#428726

sorry i closed this by accident. Please see above

#429330

If you needs more assistance for it, please duplicate same problem in a test site, fill below private detail box with login details, also point out the problem page URL and layout URL, I can setup a demo for you.

#429753

Sorry, how do I make the reply 'private'?

#429940

I just enabled the private detail box in this thread, please fill below private detail box with login details of your test site, also point out the problem page URL and layout URL. thanks

#430534

Thanks for the details, checking in your site, will feedback if there is any found

#430553

I did below modification in your website:
1) Create a view to list Obituary:
hidden link
filter with:
Include only posts with IDs determined by the URL parameter "post_ids" eg. yoursite/page-with-this-view/?post_ids=1
display the CRED form directly:
[cred_form form='46' form_name='Edit Obituary']

2) Edit the layout:
hidden link
rename it as "Layout for Edit Obituary 2"
add a visual editor cell, with below views shortcode:
[wpv-view name="edit-obituary"]

3) Edit the page:
hidden link
option "Template and Layout" setup as above layout "Layout for Edit Obituary 2"

Then you can test it in front-end, for example:
hidden link
click the link "Edit", you should be able to see the CRED form for edit Obituary post

#431708

Thank you for this.

I guess my only question is why the first option with the generated shortcode doesnt work as is recommended in the tutorials.
Is there something different about my set up or is this feature deprecated?
In the future I can see the benefit of editing forms or elements of a cpt via a form inline - but not mandatory for this project

Caspar

#431715

CRED form is using wordpress filter hook the_content to render the editing post form, so for the first option, in the layout for single Obituary post, you can add a content template cell, and with the Views shortcode [wpv-post-body], when you click the first link, the CRED form for editing Obituary post will be able to display in the area of shortcode [wpv-post-body]

More help:
https://codex.wordpress.org/Plugin_API/Filter_Reference/the_content
https://toolset.com/documentation/user-guides/content-template-cell/
https://toolset.com/documentation/views-shortcodes/#wpv-post-body

#431749

Many thanks Luo really appreciate your help

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.