Skip Navigation

[Gelöst] The Date is changing and the conditionals are not working as expected

This support ticket is created vor 6 Jahre, 8 Monate. There's a good chance that you are reading advice that it now obsolete.

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.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 1 Antwort, has 2 Stimmen.

Last updated by Christian Cox vor 6 Jahre, 8 Monate.

Assisted by: Christian Cox.

Author
Artikel
#562837
Edit View.png
Today.png
Future.png
Past.png

I am trying to:
I have a date. I want to show a message if the date is not past. If it is past, show another message. I am also trying to have a conditional if it's before Noon. If it's after noon, tell the user it's too late.

I expected to see:
I expect to see the message based on the date/time.

Instead, I got:
Nothing correct.

Nesting that I am following is here: https://toolset.com/documentation/user-guides/conditional-html-output-in-views/nesting-and-combining-conditions/

#562936

Hi, I'll try to help. I see two potential problems.
1. The rfp-time fields aren't inserted properly. The syntax should be identical to the bid-deadline field:

Use $(wpcf-rfp-time) not [rfp-time]

2. This conditional is not closed properly:

[wpv-conditional if="( $(wpcf-bid-deadline) eq 'TODAY()' )"]

Inside this conditional you'll see 'ending soon' and 'ended today', but then the conditional is not closed. So the next conditional, 'less than today', is nested inside the 'equal to today' conditional. This is why you do not see "Sorry, past" anywhere. Be sure to close the today conditional before the past conditional.

Let me know the results.

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.