Skip Navigation

[Resolved] How Do i Display CRED Edit Form Using Layouts?

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

Problem:
How Do i Display CRED Edit Form Using Layouts?
I'm following this tutorial:-
https://toolset.com/documentation/user-guides/cred-training-course/part-9-listing-items-belong-logged-user/
I've created a Layout for this page which contains a Views cell where I've added the above View. The page displays the listings correctly and the 'delete' link works but the 'edit' link doesn't.
Solution:
You are using a layout to display the single "Listing" post, and CRED form is using wordpress action hook the_content to display the CRED form for editing post, so I add a content template cell in the problem layout:
with below codes:
[wpv-post-body view_template='None']
Please test again, check if it is fixed or not.
Relevant Documentation:
https://toolset.com/documentation/user-guides/cred-training-course/part-9-listing-items-belong-logged-user/

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.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

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 julieP 7 years, 8 months ago.

Assisted by: Luo Yang.

Author
Posts
#423490

I'm following this tutorial:-

https://toolset.com/documentation/user-guides/cred-training-course/part-9-listing-items-belong-logged-user/

I'm expecting to see the edit post form but I'm seeing the actual listing.

I've created an Edit Post Form the CRED form and a View (per the instructions) and my code looks like this:-

<td><strong>[wpv-post-title]</strong></td>
<td>[types field='logo' size='thumbnail' align='center' resize='proportional'][/types]</td>
<td>[cred_link_form form='301' form_name='Edit Free Listing' text='Edit Listing' target='_self']<br/>
  [cred_delete_post_link class='cred-refresh-after-delete' text='Delete Listing' message='Are you sure you want to delete this listing?' message_after='Your Listing Has Been Deleted' message_show='1' action='trash']</td>

i have a page called 'Manage Listings' and I've created a Layout for this page which contains a Views cell where I've added the above View. The page displays the listings correctly and the 'delete' link works but the 'edit' link doesn't.

Can you advise why this isn't working and what I need to do please?

#423621

Dear Julie,

Please check these:
1) Edit the problem CRED form "Edit Free Listing"
2) In section "Basic Settings",
Forms can create new content or edit existing content. Choose what this form will do:
choose option "Edit content"
3) In section "Post Type Settings",
Choose the type of content this form will create or modify:
choose correct post type "listings"

#423664

I can confirm these have (already) been set correctly.

#423674

This is abnormal, please try this:
deactivate other plugins and switch to wordpress default theme, and test again

If the problem still exists, please duplicate same problem in a test site, and fill below private detail box with login details, also point out the problem page URL and view URL, I need a live website to test and debug, thanks

#423693

I have no other plugins.

When I switch to Twenty Sixteen the content I've added to this page (link to manage listings for logged in user and a log out link) isn't showing. There is however an 'edit' link which takes me to edit the page itself.

I'm using localhost but can set this up for you to access if necessary. I can't see a private detail box - please advise.

#423694

Please fill below private detail box with login details of your test site
also point out the problem page URL and view URL, thanks

#424028

Thanks for the details, I am checking in your website, will feedback if there is anything found

#424033

Seems you are using a broken file of CRED plugin, I just did below modification in your website:
1) Dashboard-> Plugins
Deactivate and Remove the plugin "Toolset CRED"
2) Download CRED plugin from
https://toolset.com/account/downloads/
and upload it into your website
Please test again, check if it is fixed or not.

#424095

thank you that has removed the error.

I've now added the remaining elements to the test site to check the original issue but this hasn't gone away. The elements I've added are:-

CRED Post Form (create content)
CRED Post Form (Edit Content)
user (username: tester, password: tester)
listing
manage listing page

Please go to hidden link, log in as above user, select 'Manage Your Listings' then 'Edit this listing'.

Thanks

#424099

Thanks for the details, I am checking in your website, will feedback if there is anything found.

#424104

You are using a layout to display the single "Listing" post, and CRED form is using wordpress action hook the_content to display the CRED form for editing post, so I add a content template cell in the problem layout:
hidden link
with below codes:
[wpv-post-body view_template='None']
Please test again, check if it is fixed or not.

#424108

That's excellent - thank you so much - it works now!

One last question on this subject: is it possible for just the form to be displayed when editing it? At the moment both the current listing AND the edit form are displayed.

Many thanks

#424115

In your case, I suggest you create another page for editing the "Listing" post:
see the solution in another similar thread:
https://toolset.com/forums/topic/how-to-apply-layout-to-cred-edit-form/#post-278461

#424126

That is absolutely awesome! Thank you so much for your help 🙂

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