Shopify themes, liquid, logos, and UX
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
Solved! Go to the solution
This is an accepted solution.
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
Hello @Buddings
1. Go to Online Store->Theme->Edit code
2. 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?
This is an accepted solution.
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
Portrait of Stephen positioned next to an image of planet Earth, with the Stephen's World ...
By JasonH Mar 18, 2024Digital marketers and app developers have tracked activity in apps and websites for yea...
By Ollie Mar 13, 2024February was an exciting month with Shopify Editions, informative webinars, and more! F...
By JasonH Mar 7, 2024