Saltar navegación

[Cerrado] 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.

Este tema contiene 1 respuesta, tiene 1 mensaje.

Última actualización por Christopher Amirian 1 year, 2 months ago.

Asistido por: Christopher Amirian.

Autor
Mensajes
#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
Colaborador

Idiomas: Inglés (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.

El debate ‘[Cerrado] Toolset Forms check if WYSIWYG field is empty’ está cerrado y no admite más respuestas.