Skip Navigation

[Résolu] in filter-editor conditional field to show simple text

This support ticket is created Il y a 6 années et 8 mois. 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.

Aucun de nos assistants n'est disponible aujourd'hui sur le forum Jeu d'outils. Veuillez créer un ticket, et nous nous le traiterons dès notre prochaine connexion. Merci de votre compréhension.

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)

Marqué : ,

Ce sujet contient 3 réponses, a 2 voix.

Dernière mise à jour par Christian Cox Il y a 6 années et 8 mois.

Assisté par: Christian Cox.

Auteur
Publications
#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"?