Saltar navegación

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

This support ticket is created hace 5 años, 6 meses. 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
- 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)

Este tema contiene 3 respuestas, tiene 2 mensajes.

Última actualización por Jaime hace 5 años, 6 meses.

Asistido por: Minesh.

Autor
Mensajes
#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

Idiomas: Inglés (English )

Zona horaria: 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

Idiomas: Inglés (English )

Zona horaria: Asia/Kolkata (GMT+05:30)

Can you please check now.
=> enlace oculto
=> enlace oculto

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!