Keep Your Elementor Form Hidden After Submission Using Cookies

Facebook
Twitter
Reddit
WhatsApp

jQuery - Make sure this goes under the form.

				
					<script>
    jQuery(document).ready(function($){
        const formSubmit = localStorage.getItem('formSubmit')
        
        if(formSubmit){
            console.log('form submitted')
            $('.myForm').hide()
            $('.form-message').show()
            
        }
        
        $('.myForm form').submit(function(){
            localStorage.setItem('formSubmit', 'true')
            $('.myForm').hide()
            $('.form-message').show()
            
        })
    })
</script>
				
			

CSS - Add this to your form message or section.

				
					selector{display:none;}
				
			
Subscribe
Notify of
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments

More to explorer

Elementor Multi-Column Dropdown

https://youtu.be/72L8eLoIrCU Target all dropdown menus @media(min-width:767px) { /* When hovering over a menu item that has children, display its submenu as a

0
Would love your thoughts, please comment.x
()
x

45 Minute Wordpress Support

Get your Wordpress questions answered and your Wordpress issues resolved.