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 - 196 through 210 (of 482 total)
Problem: I would like to automatically select the parent post in a new child post Form. I have a View that returns the correct parent post ID, so I would like to use that View in the Form shortcode but it does not seem to be working correctly.
Solution: It is not possible to set the parent post ID using an attribute in the cred_form shortcode, only in the parent post cred_field shortcode. You have the following options:
1. In the URL of the page containing the New House Form, add the correct parent post ID in a URL parameter. Use the urlparam attribute in the parent post cred_field shortcode to supply the name of the corresponding URL parameter. Example where the URL parameter is areaid:
[cred_field field='@book-chapter.parent' urlparam='areaid' class='form-control' output='bootstrap' select_text='--- not set ---']
2. Set the parent post ID in the value attribute on the parent post cred_field shortcode. Example where the parent post ID is 1234:
[cred_field field='@book-chapter.parent' value='1234' class='form-control' output='bootstrap' select_text='--- not set ---']