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 - 316 through 330 (of 472 total)
Problem: I have a one-to-many relationship set up. On the parent post I would like to display a link so my site Users can easily create a new child post for this parent post. I would like to automatically set the correct parent post in the Form, and I don't want to allow Users to change the selected parent.
Solution: Forms offers a New Child Post Form link. It will redirect your Users to a page with the New Child Post Form displayed, and the parent post automatically set. To hide the parent post select field, use CSS display:none or similar. Even though the field is not shown, the correct parent will be set based on the automated URL parameter.
Problem:
I have a Post Relationship (O2M) where a Toolset Post Form creating new M-Posts offers a Parent Post Selector where the user can set the O-Post to which the new post will belong to.
I want to retrieve the value of that Select2 in $_POST and use it in a cred_save_data() to populate other items with it.
How to go about it?
Solution:
A Select2 Parent Post Field in a Toolset Form, assuming a relationship between pages and posts (O2M) can be retrieved with
$_POST["@post-page_parent"]
Note that the HTML input name of the Select2 will have a dot as in
@post-page.parent
But the $_POST will listen to the key with an underscore instead of dot, as in @post-page_parent
So you can get the proper name of the $_POST Select2 input with this process:
- either open the console and find the HTML input name, replace the dot with an underscore and use that
- or, simply var_dump() the $_POST in the Form and see the precise name of all and every $_POST items
We are building an esports platform that allows users to assemble into teams and then compete in tournaments. What I would like to ask is just for some guidance on a method for achieving this with Toolset.
On my EDIT POST form, I have geolocation field, when the user edits their post, I need to allow them to lookup their address using this field, just like they can when creating a post.
Solution:
It is possible to setup a custom address field in Toolset post form, for example, you can try these:
Problem: I am trying to insert an Edit Post Link shortcode inside the loop of a View, but I keep seeing an error message "Create a new Layout that will include the editing form. You can start from scratch or copy the template you use to display the content and modify it."
Solution: When using Toolset Layouts, it's best to place the Form in a Layout using a Forms cell rather than a Visual Editor cell.