Skip Navigation

[Resolved] Parent Selection when Creating Child Post – Options not sorting

This thread is resolved. Here is a description of the problem and solution.

Problem:
If you are using more than 15 Parent Post Types, you see a Select2 field in Toolset Child Post Forms, if you have published less than 15 Parent Post types you will see a simple select field.

As soon the Select2 is used, no results are set by default and you need to type to find some results.
Those are not ordered anymore correctly.

Solution:
Update to the current stable toolset.

This support ticket is created 6 years, 6 months ago. There's a good chance that you are reading advice that it now obsolete.

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.

Our next available supporter will start replying to tickets in about 0.78 hours from now. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- - 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00
- - - - - - -

Supporter timezone: Asia/Ho_Chi_Minh (GMT+07:00)

This topic contains 2 replies, has 2 voices.

Last updated by KentS9937 6 years, 6 months ago.

Assisted by: Beda.

Author
Posts
#815629
parent_select_options.PNG

I am creating a form for create of a child post type. I'm adding a field for the user to select the parent post. I'm trying to sort the options alphabetic order based on the title but it's not sorting properly.

My cred field is setup as follows:

[cred_field field='_wpcf_belongs_hr-profiles_id' value='' order='title' ordering='asc' required='true' select_text='--- not set ---' validate_text='A worker must be selected' class='form-control' output='bootstrap']

The attached screen snapshot shows what I'm seeing. As you'll see things are not sorted.

#823238

Can you update Toolset CRED to version 1.9.6.1 which you can get here:
https://toolset.com/account/downloads/

It will however not solve the issue yet.

You are using more than 15 Parent Post Types, that is why you see a Select2 field, if you have published less than 15 Parent Post types you will see a simple select field.
That one will work fine.

As soon the Select2 is triggered, no results are set by default and you need to type to find some results.
Those are not ordered anymore correctly.

However, this issue should be resolved in the RC version (beta) of Toolset.
But, that version should not be used on production sites yet.

The fix will be included in the stable versions following the RC's as well.

#883228

Thanks for the response. I look forward to the update which fixes this problem.