Home › Forums › Support › Form buttons not showing, unable to fix them and WP Forms are blaming the theme
- This topic has 7 replies, 2 voices, and was last updated 3 years, 3 months ago by
David.
-
AuthorPosts
-
February 25, 2023 at 12:57 am #2546251
Ben
Hi Guys,
So I’m using WP forms, always have.
But I’m having issues with it displaying the submit buttons which I have customised with CSS.
When I’m logged into WordPress, the styling is there:

When I’m logged out, the styling disappears:

“Looking at the submit button, the theme sets the styling for the form to use a white color with a transparent background”
Thing is, it used to work.
It’s driving me mad because I can’t seem to fix the issue. Is there anything you guys can do?
Thanks
February 25, 2023 at 5:56 am #2546446David
StaffCustomer SupportHi there,
if i open the browser developers tools on that page ( Right Click > Inspect the page ), in the Console tab there is SG Optimized CSS file that is 404ing.
I assume that is the issue.
Begin by disabling the SG Optimizer, and then in your SG accounts cache panel flush any of the caches, do the styles return ?February 25, 2023 at 8:55 am #2546731Ben
Hi David,
Thanks for coming back to me. I really appreciate it.
I’ve turned off Siteground optimizer and flushed the sever caches (dynamic & memcached)
The style hasn’t come back. At least not on my end.
Siteground is still disabled.
February 26, 2023 at 6:01 am #2547311David
StaffCustomer SupportOK, so just to be clear its not a theme issue, if it were a theme related then i would expect to see theme styles overriding the button, but that is not the case.
As a complete aside there is an error in your custom CSS, see this rule:
a.button { font-size: 26px; line-height: 35px; padding: 10px 40px; border-radius: 3px; box-shadow: 0 2px 16px rgba(0, 0, 0, .1); transition: .2s background-color ease-in-out, .2s color ease-in-out, .2s border-color ease-in-out, .2s opacity ease-in-out, .2s box-shadow ease-in-out } }There that extra closing
}after it which should be removed as it “can” stop CSS below it from loading.OK, to the Form Button issue – looking at The Custom CSS rule for the Forms button:
div.wpforms-container-full .wpforms-form button[type=submit], div.wpforms-container-full .wpforms-form .wpforms-page-button { background-color: #ee165c !important; border: 1px solid #ee165c !important; border-radius: 3px; color: #fff; font-family: petcheckers !important; font-size: 26px; letter-spacing: -1px !important; padding: 10px 15px; width: 100%; box-shadow: 0px 2px 16px 0px rgba(0, 0, 0, .2); }Note this part of the selector:
button[type=submit]it is targeting a button with thetypeattribute.
This is also the case with the second CSS rule.But if i look at the button HTML it does not have that attribute:
<button name="wpforms[submit]" id="wpforms-submit-7852" class="wpforms-submit" data-alt-text="Searching For Dog Walkers…" data-submit-text="Find Dog Walkers Near Me" aria-live="assertive" value="wpforms-submit">Find Dog Walkers Near Me</button>If i edit the HTML in the browser dev tools and add that attribute then styles show.
Removing the attribute from the CSS should fix the issue:
div.wpforms-container-full .wpforms-form button, div.wpforms-container-full .wpforms-form .wpforms-page-button { background-color: #ee165c !important; border: 1px solid #ee165c !important; border-radius: 3px; color: #fff; font-family: petcheckers !important; font-size: 26px; letter-spacing: -1px !important; padding: 10px 15px; width: 100%; box-shadow: 0px 2px 16px 0px rgba(0, 0, 0, .2); } div.wpforms-container-full .wpforms-form button:hover { background-color: #00aeef !important; border: 1px solid #00aeef !important; border-radius: 3px; color: #fff; font-size: 26px; padding: 10px 15px; width: 100%; box-shadow: 0px 2px 16px 0px rgba(0, 0, 0, .2); transition: .2s background-color ease-in-out, .2s color ease-in-out, .2s border-color ease-in-out, .2s opacity ease-in-out, .2s box-shadow ease-in-out; }I can only assume that WP Forms updated their plugin and have changed the front end HTML, whilst you’re logged in you may be seeing an older cached HTML.
Might be worth passing this info on to them.February 26, 2023 at 7:47 am #2547429Ben
Hi David,
Thanks for your help. Unfortunately, that hasn’t worked.
Weirdly, when I copy the site over to a new domain, the issue goes away and the button displays perfectly. But when I copy it back, the issue persists.
I’ve even completely uninstalled WordPress and started again. It’s driving me mad!
Have you ever heard of this happening?
Thanks again for your help, it’s appreciated!
February 26, 2023 at 10:00 am #2547641David
StaffCustomer SupportThe CSS i provided, can you paste that in to the Customizer > Additional CSS BEFORE any other CSS, then clear your SiteGround caches, you may need to do this from the server as it can cache super hard.
February 26, 2023 at 11:42 am #2547723Ben
Hey David,
I’ve just been on with Sitegound support.
There was a faulty cache after all so it’s all fixed!
Thanks a lot for your help!
February 27, 2023 at 2:36 am #2548301David
StaffCustomer SupportGlad to hear that!
-
AuthorPosts
- You must be logged in to reply to this topic.