Skip to content
Advertisement

How to hide or remove the search form from the page (Bootstrap 4) on clicking a button?

How can I get this search form and the Search Button to disappear from the page, since it will be replaced by a Thank you message?

JavaScript

I was trying something like:

JavaScript
JavaScript

Advertisement

Answer

You have onsubmit="handleFormSubmit(this) so you better to add your <h4>Thank you!</h4> code inside of handleFormSubmit(), but anyway, you may do it like this:

JavaScript
User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement