You have a form to publish child posts, and that form includes a parent post selector.
You add that form to a page.
You edit the Content Template for the parent post type where you want to insert a link to the form to create a child post.
You need to insert a Fields and Text block (or a Classic block) to be able to access the Toolset Forms button (screenshot).
Once you click to add a form, the resulting dialog (screenshot) includes a Create Child Post Link button.
You then specify the name of the page containing the form, and be sure to select the option "Set the parent according to the currently displayed content".
I think that is everything required, can you please try the above?
Thanks for your prompted reply. I find the block editor doesn't work friendly as I familiar with the expert mode. Could you please advise how I can auto select the parent field by passing url parameter as I don't want user to select the parent post that not created by him.
I want the field='@application-contestant.parent' be auto-selected by passing url-parameter (parent post id)
I want the field='contestant-mode' be auto changed according to custom field from parent post, I can write custom code to get the custom field if I have the parent post id
I want the field='@application-contestant.parent' be auto-selected by passing url-parameter (parent post id)
I wrongly put the url-parameter, it should be parent_slug-of-parent-post_id.
I want the field='contestant-mode' be auto changed according to custom field from parent post, I can write custom code to get the custom field if I have the parent post id
I still cannot solve it as don't know whether the jQuery or shortcode can do, please advise.
You shouldn't need to make any specific changes to the form.
In my test site, switching the form to Expert mode I can see that the parent select input is inserted like so, with no special parameters to specify how it should be pre-selected:
[cred_field field='@post-thing.parent' class='form-control' output='bootstrap' select_text='--- not set ---' required='false']
The parent input gets pre-selected because of how you add a link to the form, using the cred_child_link_form shortcode, inserted as I described above.
Again, the example from my test site is like so:
[cred_child_link_form form='108' parent_id='-1' text='Create new child Thing' target='_self']
The parent_id='-1' attribute is what is responsible for setting the default on the form parent input.