Do I understand correctly, that you have a CRED form that creates a Child Post to a Parent post, and want to restrict the DropDown that lists the available Parents, to the ones belonging to a certain author only?
This should help you:
https://toolset.com/forums/topic/i-want-to-only-display-the-parent-items-of-the-current-user-in-a-select-box-2/#post-351830
To sum up:
1. By default CRED parent Picker lets you choose from all available parent Posts.
2. This snippet lets you populate the picker with only the parent posts of the current logged in user
3. This is how the CRED parent Picker field HTML has to look:
<div class="cred-group cred-group-parents">
<div class="cred-field cred-field-_wpcf_belongs_page_id">//change "page" to your parent post slug
<label class="cred-label">
Choose Parent
</label>
<input type="hidden" id="parents_id" value="[get-parents]" /> This is only for test display: [get-parents]
[cred_field field='_wpcf_belongs_page_id' value='']//change "page" to your Parent Post Slug
</div>
</div>
4. This is the JS that has to be inserted to the CRED JS Editor
jQuery('document').ready(function(){
var post_parents = jQuery('#parents_id').val();
var arr = post_parents.split(',');
jQuery("[name=_wpcf_belongs_page_id] > option").each(function() { //change "page" to your parent post slug
var option_val = jQuery(this).val();
if( jQuery.inArray(option_val, arr) == -1 && option_val != -1 ){
jQuery(this).remove();
}
});
});
5. And this is the function to put into functions.php of your Theme
function get_parents($atts) {
global $current_user;
get_currentuserinfo();
$author_query = array('post_type' => 'page', 'posts_per_page' => '-1','author' => $current_user->ID,); //change page to your parent post slug
$author_posts = new WP_Query($author_query);
$parent_ids = "";
while($author_posts->have_posts()) : $author_posts->the_post();
$parent_ids .= get_the_ID() .",";
endwhile;
return $parent_ids;
}
add_shortcode('get-parents', 'get_parents');
6. It is recommended to use Views with this and register the ShortCode in Views > Compatibility
Please aknowledge that this is custom programming work which is beyond the scope of our support.
If you need more complex Custom Logic, I would suggest you consider contacting one of our certified partners from this link:
https://toolset.com/consultant/
You will get the custom assistance you need to get on with your project.