Home › Forums › Front-end Issues › If checkbox ticked then add a class › Reply To: If checkbox ticked then add a class
In your page template file
Check if the video has Signed set to TRUE, if so add a class (let say “issigned”) to it’s
<a href="your-url" <?php if( get_field('signed') ): ?> <?php echo 'class="issigned"'; ?> <?php endif; ?> >
<a> with class issigned is clicked, add another class to the modal.
As I mentioned, I’m no expert developer and there might be a better solution to this.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
CPT registration is coming to ACF! We demoed the new feature during the most recent session of ACF Chat Fridays. Check out the summary for the details. https://t.co/k2KQ3WWBAz— Advanced Custom Fields (@wp_acf) March 7, 2023
© 2023 Advanced Custom Fields.