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.
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/
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,
Problem Solved. I had a 'single' template file that was overriding the CRED form. I appreciate the newbie hand-holding.
Thanks very much.
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