I'm using the new version of Toolst Forms (v2.0) and I can't seem to get a conditional statement to work. This was working before, but I'm not sure if the reason it's stopped working is because of the upgrade or because of something else, and I'm at a bit of a loss.
I have a post type called Ads, where the user sets the wpcf-ad-type to either "Offering" or "Seeking". Inside the Ad single page, it runs a view that displays all the responses to the ad, showing post type Ad-Response entries that are children of Ad. The line of code that isn't working is the "if wpcf-ad-type eq 'Seeking'" line below.
What's strange is that this line (added for troubleshooting purposes):
"[types field="ad-type" id="$ad"][/types]"
Correctly displays the HTML "Seeking" on the view. However, anything in this line:
[wpv-conditional if="( $(wpcf-ad-type).id(ad) eq 'Seeking' )"]
<p>[types field='ad-response-seller'][/types]</p>
[/wpv-conditional]
Does not appear on the page. Here is the full code of the view:
[wpv-items-found]
<!-- wpv-loop-start -->
<wpv-loop>
<p><strong>[wpv-post-author format="meta" meta="first_name"] [wpv-post-author format="meta" meta="last_name"] ([wpv-post-date format="j F Y, g:i a"])</strong></p>
<div class="conversation-left-speaker">"[types field="ad-type" id="$ad"][/types]"
[wpv-conditional if="( $(wpcf-ad-type).id(ad) eq 'Offering' )"]
<p>[types field='ad-response-buyer'][/types]</p>
[/wpv-conditional]
[wpv-conditional if="( $(wpcf-ad-type).id(ad) eq 'Seeking' )"]
<p>[types field='ad-response-seller'][/types]</p>
[/wpv-conditional]
[wpv-conditional if="( $(wpcf-ad-response-privacy) eq 'Public' ) OR ( '[wpv-post-author format="meta" meta="ID" id="$ad"]' eq '[wpv-post-author format="meta" meta="ID"]' ) OR ( '[wpv-post-author format="meta" meta="ID" id="$ad"]' eq '[wpv-user field="ID"]' )"]
<p>[types field='ad-response-text'][/types]</p>
[/wpv-conditional]
</div>
[wpv-view name="view-ads-responses-02-replyoption" adid="[wpv-post-id id="$ad"]" parentpostid="[wpv-post-id]" responseid="[wpv-post-id]"]
</wpv-loop>
<!-- wpv-loop-end -->
[/wpv-items-found]
Appreciate any help. Cheers.
- Aaron