Support

Account

Home Forums General Issues Date as conditional in BB

Solving

Date as conditional in BB

  • Cross posting in the Beaver Builder forum.
    Trying to put a display conditional for ACF fields. I’ve created an ACF date field. My problem is finding a way to condition the appearance of a BB module based on that date. I’ve put in a date greater than today. I’ve tried to create a conditional where that ACF field is ‘greater than’ and that’s where I think I’m failing. I’ve tried using the conditional ‘Today’. I’ve tried ‘$Today’ Any ideas on how to get a module to appear or not based on an ACF date?
    Thanks.

    Scrdeenshot

  • The problem is probably due to the fact that ACF does not store date fields in a standard date format. The format used it YYYYMMDD. At a guess I’d say that you’d need some way to use this format for the condition which would mean getting today’s date and converting it to use in your condition. Not knowing anything about BB I can’t tell you if that’s possible or not.

  • Thanks John. Maybe someone from BB will have an idea. Much appreciated.

  • An option might be to use a date/time field. ACF stores these in standard date format. Don’t know if that would help you or not.

  • Thanks John. That’s what I did, it’s a date/time field, but I can’t seem to make the BB module handshake with that field. As per my image, I’ve put in ‘greater than’ “today” but that doesn’t do the trick.

  • If BB understands ACF fields it may be comparing it to the return format you have set for the field. Try using a standard date format for the return Y-m-d H:i:s

  • Thanks again for your help John. Unfortunately, that’s not a variable. I have several boxes and I need them to know to stop displaying as of ‘Today’ or ‘Tomorrow’ or whatever. I don’t want to put a specific date in the conditional field.

Viewing 7 posts - 1 through 7 (of 7 total)

The topic ‘Date as conditional in BB’ is closed to new replies.