We are looking into enabling RSVP but to be compliant we need to ensure GTM is removed on any pages that include a form.
Is there a way to determine whether a form exists and remove GTM? In our index.php we have GTM as its own widget, so I was kind of hoping I could just put a conditional format around that, however, when I tested the following script, it couldn’t find the form. So I’m wondering if the form generates after the page loads.
<!-- TESTING -->
<xphp content="true">
<if has_element=".lw_payments_registration_form" />
<content>
<!-- TEST: FOUND FORM! -->
</content>
<else content="true">
<content>
<!-- TEST: DID NOT FIND FORM! -->
</content>
</else>
</xphp>
If I change the class to use the parent “. event-body–registration” then it works, however, that is on every event, so it always returns true.
I’m combing through the documentation but so far I haven’t been able to figure out a way (or the right way) to do this. Any suggestions?