Skip Navigation

[Closed] Toolset Forms check if WYSIWYG field is empty

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.

This topic contains 1 reply, has 1 voice.

Last updated by Christopher Amirian 1 month, 1 week ago.

Assisted by: Christopher Amirian.

Author
Posts
#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

Languages: English (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.