Support

Account

Home Forums Front-end Issues If checkbox ticked then add a class Reply To: If checkbox ticked then add a class

  • It does seem like a long way around but since the modal is created by JavaScript, we’ll most likely have to use JavaScript to influence to the modal.

    The <a> tag is our link between the HTML and the corresponding JavaScript modal.

    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> tag.

    
    <a href="your-url" 
    	<?php if( get_field('signed') ): ?>
    		<?php echo 'class="issigned"'; ?>
    	<?php endif; ?>
    >
    

    In your Javascript file
    When an <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.