lilyput007
Forum Replies Created
-
Forum: Plugins
In reply to: [Contact Form 7] Hide form using DOM EventsYou would of needed to put the javascript I posted earlier in your template file or maybe at the end of your contact7 form for it to work.
- This reply was modified 8 years, 2 months ago by lilyput007.
Forum: Plugins
In reply to: [Contact Form 7] Hide form using DOM EventsI had the same problem and couldn’t update past 4.7 but eventually got it working. If you reverted back to 4.7, have you put the original code back in additional settings and removed the javascript from the footer?
Forum: Plugins
In reply to: [Contact Form 7] Hide form using DOM EventsDid you change the id ‘hideform’ to the id of your containing div ?
This is my div which contains my form
<div id="hideform" class="form-group-res">Make sure you have the latest version of contact7. I’m running version 5.0
Forum: Plugins
In reply to: [Contact Form 7] Hide form using DOM EventsHere you go. It doesn’t work if put inside additional settings, so put it in the footer – it works for me.
<script> document.addEventListener( 'wpcf7mailsent', function( event ) { document.getElementById('hideform').style.display = 'none'; }, false ); </script>Other DOM events here
https://contactform7.com/dom-events/- This reply was modified 8 years, 2 months ago by lilyput007.
Forum: Plugins
In reply to: [Contact Form 7] Hide form using DOM EventsCheck the opening and closing apostrophe in the pasted code is correct and not special characters.
this won’t work (copied and pasted from the above code)
document.getElementById(‘asaphide’).style.display = ‘none’;this will
document.getElementById('asaphide').style.display = 'none';