CRED plugin allows you to build forms that create child posts and set parents for these posts, supporting the parent-child relationship functionality from Types plugin.
When you ask for help or report issues, make sure to tell us the structure of your content and the relationship between the content types.
Viewing 15 topics - 601 through 615 (of 620 total)
Problem:
Client is using the cred_save_data hook to dynamically generate a child post title based upon the title of the parent post, how should they retrieve the correct parent post ID?
Solution:
This changed with Types 3, which no longer stores the parent post ID on the child post.
You would get the parent post ID using the toolset_get_related_post function of the new API.
Problem:
A Toolset Form includes a parent post selector, and the dropdown which lists the parent posts is in the format post ID : post title, when all that is required is the post title.
Solution:
This arises in certain circumstances depending on the form in question, but the post ID will be removed in the next update so that only the post title appears.
Problem: I would like to show a Form that allows Users to create a child post, using the current post as the parent.
Solution: In a Form that creates the child posts, you should have a parent select field. If not, add the field or regenerate the form contents. If you do not want to display the field to your Users, use CSS to hide the field. Then set the value of the field using the current post's ID.
<div style="display:none;">
[cred_field field='@book-chapter.parent' select_text='--- not set ---' class='form-control' output='bootstrap' value="[wpv-post-id id='$current_page']"]
</div>