I have created 2 custom post types: Eleones, Mazemata
They have a one-to-many relationship.
I now have a cred form to create the childs (mazemata). In this form I need to automatically populate a select input with the parents (Eleones), so I have used this:
[cred_field field='@eleonas-mazema.parent' class='form-control' output='bootstrap' display='select' select_text='Επιλέξτε' required='true' order='date' max_results='50']
This produces a select input with ONLY 10 options (Eleones).
This seems like a bug to me.
Please advise.
Thank you,
Kostas
Minesh
Supporter
Languages:
English (English )
Timezone:
Asia/Kolkata (GMT+05:30)
Hello. Thank you for contacting the Toolset support.
What if you try to add the following code to the "Custom Code" section offered by Toolset:
add_filter('cred_select2_ajax_get_potential_relationship_parents_query_limit', function($limit){
return 50;
});
More info:
- https://toolset.com/documentation/programmer-reference/adding-custom-code/using-toolset-to-add-custom-code/#adding-custom-php-code-using-toolset
Hello Minesh,
Your snippet did the trick, select is now populated with all parents, thanks!
Is this documented somewhere?
Thanks again,
Kostas
Minesh
Supporter
Languages:
English (English )
Timezone:
Asia/Kolkata (GMT+05:30)
Glad to know that the solution I shared help you to resolve your issue.
Currently there is no related Doc available but I will make a request to add this to documentation.
Minesh,
Please do request to add this to documentation!
Thank you,
Kostas