Skip Navigation

[Resolved] Admin relationship display with conditional

This support ticket is created 5 years, 8 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
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 1 reply, has 2 voices.

Last updated by Christian Cox 5 years, 8 months ago.

Assisted by: Christian Cox.

Author
Posts
#1218117

I'm building a small LMS with toolset and i have a custom post type called "Evaluaciones" (Evaluations) and it has a one to many relationship with another CPT called "Alternativas" (Alternatives), so one evaluation can have many alternatives. "Evaluaciones" has a field to select the evaluation type, one of them being "seleccion-multiple" (Multiple selection). I want to display the relationship in the admin only when "seleccion-multiple" is selected.

How can i interact with those admin blocks with php? i was thinking using javascript to select it with the html attribute data-wpt-name="wpcf[formato-desafio]" but i was wondering if there is a simpler way to do it or if i'm missing something about your api.

Thank you

#1218430

Hi, if I understand correctly you would like to display the post relationship editor panel / block conditionally based on the selected value in a custom field. Is that correct? If so, I'm afraid that's not possible. There are data-dependent systems for displaying custom fields or custom field groups, but not the post relationship editor(s). That would require a signficant amount of custom code. If you'd like to see this feature added to the software, I encourage you to submit a request here: https://toolset.com/home/contact-us/suggest-a-new-feature-for-toolset/
These requests are submitted directly to those in charge of product direction.