Tell us what you are trying to do?
I am trying to obtain the parent ID of the current post and have it automatically populated into a child form on the same page.
I have created the CPT "Tenders" which is the parent.
I want to allow users to submit "Tender queries" (which is the child CPT).
The single "Tender" view has a form for creating a new "Tender query" but I need the relationship to the parent to be automatically set when adding a new "Tender query"
Currently I have tried this code:
[cred_field field="@RELATIONSHIP-SLUG.parent" value='[wpv-search-term param="wpv-post-id"]' class="form-control" output="bootstrap" select_text="--- not set ---"]
Hi Minesh. Thanks for your response and for your previous assistance.
Unfortunately this hasn't resolved my issue.
Could it be a permissions problem or something like that?
Can you please share problem URL where you added yoru form as well as admin access details and let me check whats going wrong with your setup.
*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.
I have set the next reply to private which means only you and I have access to it.
The issue was you do not replace the relationship slug.
You have added it as:
[cred_field field="@RELATIONSHIP-SLUG.parent" value='[wpv-post-id]' class="form-control" output="bootstrap" select_text="--- not set ---"]
So, I've replace the relationship slug as given under:
[cred_field field="@tender-to-tender-query.parent" value='[wpv-post-id]' class="form-control" output="bootstrap" select_text="--- not set ---"]
But as you are on the same parent page, it does not makes sense to add select dropdown, so I've added the generic hidden field that will hold the parent ID as given under: