Support

Account

Home Forums ACF PRO Change the style based on the day and time

Helping

Change the style based on the day and time

  • HI. I would like to ensure that, after the day and time set on the date picker, the “.form-registration” class is assigned the “display: none;” style. How can I do?
    P.S. I use “Code Snippets” of “Code Snippets Pro” to insert the code.

  • If you are still looking for an answer, what form is this? Are you talking about the WP registration form or some other form.

    But basically

    
    $date_time = strtotime(get_field('your_date_time_field', false, false));
    if (time() > $date_time) {
      ?><style>.form-registration {display:none;}</style><?php 
    }
    
Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.