Hello, I would like to stop the form from collapsing on form submit. I looked around for existing solutions and came across this post: Disappearing Form on submission - #3 by Beez
I tried putting the following code in an embed, before body tag, and head tag but nothing worked. Here’s the snippet:
.form
{display: block !important;}
Can someone let me know what I am doing wrong?
Thank you.
memetican
(Michael Wells)
December 25, 2022, 5:39pm
2
Make sure you’ve declared it in a style element;
<style>
.form { display: block !important; }
</style>
And that your form actually has a class of form
.
If you’re not sure, you can use an ID for greater CSS specificity,
Try giving your form a unique ID like myform
, and then use that as the selector;
<style>
#myform { display: block !important; }
</style>
1 Like
Hi Michael, thanks for replying. I can confirm I had a specific style class applied (form).
I also added a unique ID and then copied your code to both my “Inside tag” and “Before tag”.
Am I supposed to place the code somewhere else?
Thank you.
memetican
(Michael Wells)
December 27, 2022, 7:22am
4
Not sure what you’re doing, you’d need to share your project link.
You definitely only want the code in one place.
1 Like
Hi Michael, here is the read only project link: Webflow - HOBI and the live link (you can submit a form to test).
Where should I place the code? I have the rest of my code in the “before /body tag” section.
memetican
(Michael Wells)
December 27, 2022, 10:00am
6
Here you go-
<style>
#contactform form { display: block !important; }
</style>
1 Like
Thank you so much, Michael. This worked.
Happy holidays!
Edit: Also, those video messages? Insanely helpful. Thank you for going the extra mile!