Skip Navigation

[Resuelto] in filter-editor conditional field to show simple text

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

Hoy no hay técnicos de soporte disponibles en el foro Juego de herramientas. Siéntase libre de enviar sus tiques y les daremos trámite tan pronto como estemos disponibles en línea. Gracias por su comprensión.

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)

Etiquetado: ,

Este tema contiene 3 respuestas, tiene 2 mensajes.

Última actualización por Christian Cox hace 6 años, 8 meses.

Asistido por: Christian Cox.

Autor
Mensajes
#628240

Hi,

im trying to show simple Text in filter-editor if field is not empty. Like:

[wpv-control-postmeta field="wpcf-myfield" type="checkboxes" url_param="wpv-wpcf-myfield"]
[wpv-conditional if="( $(wpcf-myfield) ne '' )"]<div class="zikb"> Zi/K/B</div>[/wpv-conditional]

is this not possible?

Thx for an answer - best regard alex

#628442

Hi, at this time we do not offer the ability to change View filters automatically based on the values of other View filters. This type of modification would require custom JavaScript code that falls outside the scope of the support we provide here in the forums, unfortunately. We do offer a portal where you can connect with skilled developers who may be able to assist with this project: https://toolset.com/contractors

#629953

Hey,

it dont wanna changed based on the values of other View filters - i wanna show some simple text in Filtersection if some Values of CPT not empty.. - This is not possible too?

In these while i put some text based on a div around the filter - if the div empty i put some some css content:""; with :empty in the div - its a workaround i dont wanna use.. 😉

best regards - alex

#630355

Yes, it is possible to use conditionals in the Filter Editor panel, but the conditionals must refer to the current post or current page, not one of the results of the View. The code you included above:

[wpv-conditional if="( $(wpcf-myfield) ne '' )"]<div class="zikb"> Zi/K/B</div>[/wpv-conditional]

In this case, "myfield" refers to a custom field on the current post or current page. It does not refer to a custom field on one of the results of the View. Where is this View placed, and what types of posts does it query? Where is the custom field "myfield"?