Skip Navigation

[Resolved] Auto fill parent field in CRED form

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Our next available supporter will start replying to tickets in about 0.03 hours from now. Thank you for your understanding.

This topic contains 18 replies, has 5 voices.

Last updated by Joff 7 years, 2 months ago.

Assigned support staff: Luo Yang.


Hi Pawel,

I have setup a testing site.
Can you please enable the form to send you access credentials?


Also one more thing: after your site theme refresh I don't receive animore email updates on support topics. I've checked the "Notify me of follow-up replies via email" checkbox but no more updates are coming.


Luo Yang

Languages: English (English ) Chinese (Simplified) (įŽ€äŊ“中文 )

Timezone: Asia/Hong_Kong (GMT+08:00)

Hi Carlo,

I just take over this ticket, and the WordPress access details is not valid,
I assume you need a hidden field in the CRED form for create a child review post, which stores the parent movie post ID,

You can try below two option:
A) put your CRED form in another page, add a "Create Child Content link" in your movie content template, and enable the option "Set the parent according to the currently displayed content"
See the document:
Forms for the Currently Displayed Parents

B) if you display the CRED form in the the parent movie post, you can try create a shortcode to get the current movie post ID, for example:
1) add codes in your theme/functions.php:

add_shortcode('current-parent-id', 'current_parent_id_func');
function current_parent_id_func($atts, $content){
	$queried_object = get_queried_object();
	return $queried_object->ID;

2) add a hidden Generic Fields in your CRED form:
for example:
[cred_generic_field field="_wpcf_belongs_movie_id" type="hidden" class="" urlparam=""]

Please replace "movie" with the slug of your post type "movie"


Hi Luo,

that's exactly what I was looking for!

Thank you.
I hope you could add to your to-do-list the option "set as parent the post this cred form is inserted in" for CRED forms.

It could be really useful at least for me 😀

I'd like to thank even Pawel for his great support.

Best regards


If it helps anyone down the track, I was just wanting to pull the parent title into my form. I have the form shortcode within the page.

I slightly modified the code to suit

//Shortcode to get current page as parent (for CRED form relationships)
add_shortcode('current-parent-id', 'current_parent_id_func');
function current_parent_id_func($atts, $content){
    $queried_object = get_queried_object();
    $title = get_the_title($queried_object);
    return $title;

Now the [current-parent-id] shortcode provides the parent title. As get_queried_object returns the current post, this could be modified to extract any post data really.