Hi there
This should be possible because when you use the Create Child Post Link it passes the ID of the parent post via a URL parameter, and you can use that to specify the source when outputting field values so that the values come from the parent post.
You don't need any JS, though you'll see that we run into a problem and will need to use PHP to register a custom shortcode.
If you have some checkbox fields in your child post form, you can set the default value to be that which we retrieve from the same field of the parent post.
The visual editor doesn't let you set a default value on a checkbox field, so you would need to switch to the Expert mode.
Locate the cred_field shortcode responsible for one of the checkbox fields. You can test having it checked by default by adding the attribute value="1" to it.
Now, we want the "1" to actually come from the value of the same field in the parent.
The URL parameter that passes the ID of the parent post should look something like parent_company_id.
We can reference the value of the URL parameter using the shortcode wpv-search-term, so this should generate the ID of the parent post:
[wpv-search-term param="parent_company_id"]
You can use this to provide the value for the item attribute which can be added to shortcodes to specify an alternate source for the data.
Assuming you have a checkbox field with a slug of "checkbox-one", then a shortcode like this would output the raw value of checkbox-one from the parent post:
[types field='checkbox-one' output='raw' item="[wpv-search-term param='parent_company_id']"][/types]
So you can use that to provide the default value for the corresponding checkbox field.
Putting that altogether would give you something like:
[cred_field field='confirm-one' force_type='field' class='form-check-input' output='bootstrap' value='[types field='checkbox-one' output='raw' item="[wpv-search-term param='parent_company_id']"][/types]']
Except, if you look closely you might appreciate that this is going to run into a problem because of the use of single and double quotes; because we essentially nest arguments up to 3 times, there is no combination of two types of quotes that is sufficient, we need three types of quotes to avoid breaking things, but we only have two.
We can resolve this by registering a custom shortcode to do the same as the wpv-search-term shortcode, but instead of declaring the parameter via a param shortcode attribute, we'll specify the attribute to use as shortcode content instead, e.g.
[url-param]parent_company_id[/url-param]
That way we get to specify the parameter without relying on quotes.
This is the code you need to register such a shortcode:
add_shortcode( 'url-param', function( $atts = [], $content = null ){
$return = '';
if ( isset( $_GET[$content]) ){
$return = $_GET[$content];
}
return $return;
});
(You can add that as a snippet at Toolset > Settings > Custom Code.)
To be able to use that shortcode where we need it, you need to register it at Toolset > Settings > Front-end content > Third-party shortcode arguments.
Finally, we can set the default value of the checkbox-one field based on the value from the parent post with
[cred_field field='checkbox-one' force_type='field' class='form-check-input' output='bootstrap' value="[types field='checkbox-one' output='raw' item='[url-param]parent_company_id[/url-param]'][/types]"]