Skip Navigation

[Resolved] adding comments via cred form

This support ticket is created 6 years, 6 months ago. There's a good chance that you are reading advice that it now obsolete.

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.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 5 replies, has 2 voices.

Last updated by Luo Yang 6 years, 6 months ago.

Assisted by: Luo Yang.

Author
Posts
#849154
Screen Shot 2018-05-07 at 3.37.00 PM.png

When using a cred form for post comments, the child post is not saving the post relationship. It has to be set manually. I need the post relationship[ to be saved when someone adds a comment. By the way, the status is set to 'Pending Review' upon submission.

hidden link

#852222

Hello,

I assume the "post comments" custom post type, which is a child post type of post type "my-cpt".

1) Setup the post type "post comments" as child post type "my-cpt":
https://toolset.com/documentation/user-guides/creating-post-type-relationships/

2) Follow our document to setup the CRED form for creating the child post:
https://toolset.com/documentation/user-guides/cred-forms-for-child-content/

You can setup the default value of the parent selector by specific the attribute "value" of shortcode [cred_field], for example:

[cred_field field='_wpcf_belongs_my-cpt_id' value='[wpv-post-id]' ...]

It will be able to setup current post ID as the the default value, see our document:
https://toolset.com/documentation/user-guides/cred-shortcodes/#cred_field

value: Preset value

#857508

I couldn't be more lost. I have built dozens of sites with Toolset and still I struggle with this one. I am happy to provide credentials if you would take a look for me.

#863570

In case it is a compatibility problem, please try this:
1) deactivate other plugins and switch to wordpress default theme, and test again
2) If the problem still persists, please provide your website credentials in below private detail box, also point out the problem page URL and CRED form URL, I need a live website to test and debug. thanks

#863972

Thanks for the details, I am checking it in your website, will feedback if there is anything found

#863974

Here are what I found:
1) In the CRED form "Post Comment", there isn't post relationship field, so I have add below codes in it:

[cred_field field='_wpcf_belongs_post_id' value='[wpv-post-id]' order='date' ordering='desc' select_text='--- not set ---' class='form-control' output='bootstrap']

2) Test it in front-end, all you need to do is using CSS codes to hide the dropdown menu