Conditional Issues

Hi,

I have a start date custom field and an end date custom field. I am pulling them in with two text boxes. I’d like for the end date to show up only if it is different from the start date. However, there is no NOT equal to options when setting it up via a string. Ideally I could do:

{{dc:acf:post_field field=“end_date”}} is NOT equal to {{dc:acf:post_field field=“start_date”}}

That isn’t an option so I set up CPT tags and made it Multi-Day. I’d like to show that end date only if Multi-Day is the tag. I did “Partner Event Tag is Multi-Day”. But, that doesn’t seem to work either. Can you help me figure this out.

Thanks,
Jen

Hi Jen,

Thanks for reaching out.
I have checked your ACF field settings and updated the field return type to Ymd to easier comparison, and also added the datetime comparison in the Condition instead of String or Number.

{{dc:acf:post_field field="start_date" type="date" }} before {{dc:acf:post_field field="end_date" type="date" }}

Which applies the condition to show the End Date only if it is greater than the Start Date, and it is working as expected.

Thanks

Thank you!!

Hi Jen,

You are most welcome.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.