Skip Navigation

[Résolu] Front end editing of Custom Post with CRED

The Toolset Community Forum is closed, for technical support questions, please head on to our Toolset Professional Support (for paid clients), with any pre-sale or admin question please contact us here.
This support ticket is created Il y a 9 années et 12 mois. There's a good chance that you are reading advice that it now obsolete.
This is the community support forum for Types plugin, which is part of Toolset. Toolset is a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients and people who registered for Types community support can post in it.

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 4 réponses, has 3 voix.

Last updated by johnD-32 Il y a 9 années et 12 mois.

Assisted by: Luo Yang.

Auteur
Publications
#215001

I have a very basic question about using CRED forms to edit content. I need to generate a list of custom posts by the CURRENT USER and have the user be able to click on the title to view and edit the posts' content. I cannot seem to get the information I need from the available CRED or VIEWS documentation.

1 - I created custom post type called "Pets" - and added some fields (like breed, sex, etc)
2 - I used VIEWS to generate a list of "Pet" posts made by the current user - and I inserted that view into a PAGE - works great.
3 - I created a CRED form to EDIT the "Pet" posts using 'Auto-generate form' to create the form content.

My Question: How do I use the CRED form I created to allow the user to *EDIT* the individual "Pet" posts that are displayed in the View?

I am just looking for some basic direction on how to go about making this MASTER / DETAIL view with the ability to edit the details. The CRED documentation includes a section on "How to display CRED forms", but it does not give any details about how to implement the EDIT features from a list of custom posts.

Any help or direction would be greatly appreciated.

#215029

Hi jackC,

I suggest you add a "edit post" link for each post in your view, which will redirect your user to the edit form.
Please edit your view which "generate a list of "Pet" posts",
in section "Layout HTML/CSS/JS", put the link to where you want, like this:
click "CRED forms" button, Edit content form-> choose your CRED form
More help:
https://toolset.com/documentation/user-guides/creating-cred-forms/

#215150

Thanks for your reply. I am still having some difficulty...

I was able to insert the edit link as you described - however, when I follow the link, I see the post - but not the edit form. Here's what I have ...

The View with the pet list has a link for each post. Here is an example of the link:
hidden link

When I follow the link, I do not see the edit form - only the post itself. Here is the HTML for the CRED form made with the auto generate form feature ...

[credform class="cred-form cred-keep-original"]

[cred_field field="form_messages" value=""]

<div class="cred-field cred-field-post_title">
<div class="cred-label">Neighborhood Pet Name</div>
[cred_field field="post_title" post="neighborhood-pets" value="" urlparam=""]
</div>

<div class="cred-field cred-field-_featured_image">
<div class="cred-label">Featured Image</div>
[cred_field field="_featured_image" value="" urlparam=""]
</div>

<div class="cred-group cred-group-Pet-Details">
<div><h2>Pet Details</h2></div>
<div class="cred-field cred-field-pet-type">
<div class="cred-label">Pet type</div>
[cred_field field="pet-type" post="neighborhood-pets" value="" urlparam=""]
</div>
<div class="cred-field cred-field-sex">
<div class="cred-label">Sex</div>
[cred_field field="sex" post="neighborhood-pets" value="" urlparam=""]
</div>
<div class="cred-field cred-field-owners-name">
<div class="cred-label">Owner\'s Name</div>
[cred_field field="owners-name" post="neighborhood-pets" value="" urlparam=""]
</div>
<div class="cred-field cred-field-pet-description">
<div class="cred-label">Pet Description</div>
[cred_field field="pet-description" post="neighborhood-pets" value="" urlparam=""]
</div>
<div class="cred-field cred-field-owner-address">
<div class="cred-label">Address, Zip</div>
[cred_field field="owner-address" post="neighborhood-pets" value="" urlparam=""]
</div>
<div class="cred-field cred-field-date-of-birth">
<div class="cred-label">Date of Birth</div>
[cred_field field="date-of-birth" post="neighborhood-pets" value="" urlparam=""]
</div>
<div class="cred-field cred-field-owner-phone">
<div class="cred-label">Owner\'s Phone</div>
[cred_field field="owner-phone" post="neighborhood-pets" value="" urlparam=""]
</div>
<div class="cred-field cred-field-owners-email">
<div class="cred-label">Owner\'s Email</div>
[cred_field field="owners-email" post="neighborhood-pets" value="" urlparam=""]
</div>
</div>

[cred_field field="form_submit" value="Submit" urlparam=""]

[/credform]

Please let me know what I may have missed to show the edit form.

Thanks very much,

#215173

Problem Solved. I had a 'single' template file that was overriding the CRED form. I appreciate the newbie hand-holding.

Thanks very much.

#570886

Hello,
I need a help on toolset post type ,i have created a post type with toolset called offers to post the offers on my advertising site .i have made many fields in this post type,

i want that users can post the offer with this post type form as i'm posting in backend from the front.please let me know how it can be possible.

Thanks
John

Le forum ‘Types Community Support’ est fermé à de nouveaux sujets et réponses.

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