Hello I am currently using an Ira theme. How do I hide the contact us form after submitting a message? such that it only shows the “Thank you for…” message after every successful submission
website: buddings.co
Hello I am currently using an Ira theme. How do I hide the contact us form after submitting a message? such that it only shows the “Thank you for…” message after every successful submission
website: buddings.co
Hello @Buddings
Go to Online Store->Theme->Edit code
Asset : theme.js.liquid->paste below code at the bottom of the file.
$( document ).ready(function() {
if($('.contact__success').text()!==undefined && $('.contact__success').text()!==''){
$('.contact__content .contact__text').hide();
}
});
keep me posted if that corrects your problem
Belgacem
@Uncle_ben Hello it managed to hide the top text which is great! But how can I also hide the contact form?
Hello @Buddings
Change the code with this :
$( document ).ready(function() {
if($('.contact__success').text()!==undefined && $('.contact__success').text()!==''){
$('.contact__content .contact__text').hide();
$('#contact_form input , #contact_form textarea, #contact_form button').hide();
}
});
If helpful then please Like and Accept Solution.
Thx
@Uncle_ben Yes it worked thank you!