Tell us what you are trying to do? add a new child post from the parent post using a link to a the child form
Is there any documentation that you are following?
https://toolset.com/documentation/post-relationships/selecting-parent-posts-using-forms-create-child-items/#creating-forms-when-a-parent-post-is-preselected
Is there a similar example that we can see?
https://toolset.com/documentation/post-relationships/selecting-parent-posts-using-forms-create-child-items/#creating-forms-when-a-parent-post-is-preselected
What is the link to your site?
lien caché
I have created a Parent content template and insert a relationship link in the following method:
[types field='client-first-name'][/types]<br>
[types field='client-last-name'][/types]<br>
[types field='client-id-number'][/types]<br>
[cred-relationship-form-link form='new-protfolio-analysis-child' parent_item='$current' content_template_slug='new-portfolio-child-form']Add a Client Portfolio[/cred-relationship-form-link]
in the create a new child post form I used the following:
[credform]
<div class="form-group">
<label>Portfolio Date</label>
[cred_field field="portfolio-date" force_type="field" class="form-control" output="bootstrap"]
</div>
<div class="form-group">
<label>Upload Single Portfolio File</label>
[cred_field field="u-sngl-portfolio-file" force_type="field" class="form-control" output="bootstrap"]
</div>
<div class="form-group">
<label>Clients Clients Portfolios</label>
[cred_field field="@client-client-portfolio.parent" class="form-control" output="bootstrap" select_text=""]
</div>
[cred_field field="form_submit" output="bootstrap" value="Oreder Portfolio Analysis" class="btn btn-primary btn-lg"]
[/credform]
when i click the link from the parent post i get the form to create the child however the relationship connection does not work.
what am i missing here?
please advise,
thanks,
David
Dear David,
I assume we are talking about one-to-many relathipship, and you are going to display a create child post link in the single parent post.
In the "Parent content template", you are using a relationship form shortcode:
[cred-relationship-form-link ...]
But in your case, you need to follow our document to do these:
1) Create a post form for creating child post
2) Put it into a WordPress page
3) In the "Parent content template", display the create child post link by this:
click button "Toolset Forms", in section "Other Toolset Forms actions", click button "Create Child Post Link", and setup the link. see screenshot create-child-link.JPG
My issue is resolved now. Thank you!