Passer la navigation

[Closed] Toolset Forms check if WYSIWYG field is empty

This support ticket is created Il y a 1 year, 2 months. 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.

Ce sujet contient 1 reply, a 1 voix.

Dernière mise à jour par Christopher Amirian Il y a 1 year, 2 months.

Assisté par: Christopher Amirian.

Auteur
Publications
#2800768

Ian

I want to set conditional content in a Toolset form that is contingent on having content in a WYSIWYG field having content. There appears no way to do this with the simple form settings.

Is it possible to check if a WYSIWYG field called "Reason for Rejection" (reason-for-rejection) is empty?

#2801021

Christopher Amirian
Supporter

Les langues: Anglais (English )

Hi,

Welcome to Toolset support. It should be possible to check for empty field but you need to make sure that the raw output is used and you need to check the nested " and ' characters are added correctly.

A shortcode like this can be tested:

[wpv-conditional if="('[types field='reason-for-rejection' output='raw'][/types]' eq '')"]
    <!-- Content if the field is empty -->
[/wpv-conditional]

This approach checks if the “Reason for Rejection” field (with slug reason-for-rejection) is empty by outputting its raw value. If you experience issues with quotation marks or special characters, consider replacing them with HTML entities as described here:

https://toolset.com/forums/topic/conditional-for-empty-term-meta-wysiwyg/

Thanks.

The topic ‘[Closed] Toolset Forms check if WYSIWYG field is empty’ is closed to new replies.