Skip Navigation

[Resolved] “— not set —” from Parent dropdown still displaying

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

Problem:
On a CRED form for a child post, the Select dropdown for the parent post shows an empty "--not set--" option when we make the field required.

Solution:
As of today, this is a bug in Toolset CRED v1.9.0.1 and is reported to be fixed. In the meantime, please use this jQuery workaround. Add the below JS code in your CRED Edit Form >> JS editor section:

( function( $ ) {
    $( document ).ready( function(){
  
      $('select[name*="post_parent"] option:contains("--- not set ---")').remove();
    });
})( jQuery );
This support ticket is created 7 years, 4 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.

Sun Mon Tue Wed Thu Fri Sat
- 12:00 – 17:00 12:00 – 17:00 12:00 – 17:00 12:00 – 17:00 12:00 – 17:00 -
- 18:00 – 21:00 18:00 – 21:00 18:00 – 21:00 18:00 – 21:00 18:00 – 21:00 -

Supporter timezone: Asia/Karachi (GMT+05:00)

Author
Posts
#548722
required-cred.png
not-set-cred.png

Hi,

I am building CRED form and if I place

required='true'

to

[cred_field field='_wpcf_belongs_autor_id' value='' class='form-control' output='bootstrap']

it adds -- Please Select -- but --- not set --- is still there, which doesn´t make sence. It should be fixed as it states in the last post here: https://toolset.com/forums/topic/how-to-remove-not-set-from-parent-dropdown-when-field-is-required/

So it it fixed or not? If it is fixed, what I am doing wrong?

Thanks

#548782

Noman
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hi David,

Thank you for contacting Toolset Support.

Looks like the fix didn't work well and issue still exists, I am again escalating this issue to our 2nd tier support.

In the meantime, can you try a jQuery workaround.

( function( $ ) {
    $( document ).ready( function(){
 
      $('select[name*="post_parent"] option:contains("--- not set ---")').remove();
    });
})( jQuery );

Thank you

#548798

Thank you, it works! But if it will be fixed in plugin itself, it would be much better 🙂

#555049

Hi, I have updated Toolset CRED to the latest 1.9.1 version. It solved a problem, but made another one.

-- Please Select -- is not displaying now (it can be translated, but it´s not visible)
--- not set --- is still there which is ok, but cannot be translated.

I thought that developers will remove --- not set --- from drop down list. So can you help me, how to translate --- not set ---? Because it´s not in wp-cred.po file.