Skip Navigation

[Resolved] Make Parent Taxonomy in a Dropdown Non-Selectable

This support ticket is created 5 years, 3 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.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

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 3 replies, has 2 voices.

Last updated by Jaime 5 years, 3 months ago.

Assisted by: Minesh.

Author
Posts
#1298727

I am trying to: Make some parents fields not selectable.

Link to a page where the issue can be seen: It's a logged in users page, but I can give you access if it's useful.

I expected to see: Parents fields in a "New post" an "Edit Post" form not selectable.

-> -> Support team helped me to make some parent fields not selectable in a Search dropdown. But I need to make also unselectable those fields in a "New post form" and in a "Edit post form".
The support team provided me a JS code, which worked perfectly in the search dropdown, but it's not working in the "New post form" nor in the "Edit post form".

The code provided was this:

-> I guess the problem is something with this piece of code

js_event_wpv_parametric_search_form_updated

which is related with the search and not with the post form, but I'm not sure what I have to insert here.
Could you help me with this please?

#1299087

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

The hook you shared "js_event_wpv_parametric_search_form_updated" is belongs to Views. I would like to know what parent you want to target and whats your expected results with Toolset form.

Can you please share problem URL access details.

*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.

I have set the next reply to private which means only you and I have access to it.

#1299285

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Can you please check now.
=> hidden link
=> hidden link

I've added the following JS code to both (add/edit) form's JS box:

jQuery(document).ready(function($){
   
  jQuery("select[name='categoria-guia-produccion[]']").each(function(){
      id = $(this).attr("id");
	  jQuery('#'+id+' option:eq(0)').attr("disabled", "disabled");
   });
});
#1300411

My issue is resolved now. Thank you!