Skip Navigation

[Resolved] Select population is limited to 10 parent posts

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
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10: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/Kolkata (GMT+05:30)

This topic contains 4 replies, has 2 voices.

Last updated by Kostas 1 year, 7 months ago.

Assisted by: Minesh.

Author
Posts
#2605531

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

#2605601

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

#2605665

Hello Minesh,
Your snippet did the trick, select is now populated with all parents, thanks!

Is this documented somewhere?

Thanks again,
Kostas

#2605669

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.

#2605671

Minesh,

Please do request to add this to documentation!

Thank you,
Kostas