I am trying the following:
[wpv-conditional if="( NOT(empty( $(wpcf-course-assessment-and-certification).id(courses) )) )" debug="true"]
<h3>Assessment and certification</h3>
[types field="course-assessment-and-certification" id="$courses"][/types]
[/wpv-conditional]
The field $(course-assessment-and-certification) does have a value on the parent course, but the NOT and EMPTY do not resolve. I was unable to use the standard "eq" as the value of $(course-assessment-and-certification) contains both ' and " characters...
How do I get
if="( NOT(empty( $(wpcf-course-assessment-and-certification).id(courses) ))
to evaluate as true?
Shane
Supporter
Languages:
English (English )
Timezone:
America/Jamaica (GMT-05:00)
Hello,
Thank you for contacting our support forum.
Could you send me the debug data for this so that I can have a look. I see that you set debug to be true so there should be some debug data showing on the frontend.
Thanks,
Shane
hidden link
I get the following debug:
####################
wpv-conditional attributes
####################
Array
(
[if] => ( NOT(empty( ($(wpcf-course-assessment-and-certification).id(courses)) )) )
[debug] => true
)
####################
Debug information
####################
--------------------
Original expression: ( NOT(empty( ($(wpcf-course-assessment-and-certification).id(courses)) )) )
--------------------
however if I just run [types field="course-assessment-and-certification" id="$courses"][/types] I can see the data...
Shane
Supporter
Languages:
English (English )
Timezone:
America/Jamaica (GMT-05:00)
Hello,
I would recommend evaluating it as a temporary workaround, however I did my own evaluation of a case like this and it works.
Could you let me know the type of field that you are checking in the conditionals so I can test that case as well as a sample text.
Thanks,
Shane