Can't override gravity forms styles in Pro

This is the style sheet that’s been overriding all of my CSS: “/wp-content/themes/pro/framework/css/dist/site/gravity_forms/renew.css?ver=1.1.1”

How do I fix this?

Hey @waggle

where do you have enqueued your stylesheet?
If you have manually included that in a plugin or somewhere else in the code, you should make sure, that you stylesheet fires at the end.

Otherwise if you don’t need that script, you can use the de Dequeue function from wp: https://developer.wordpress.org/reference/functions/wp_dequeue_script/

Otherwise, and in the worst case you can set the css to !important, but this method is not common with your mentioned script.

Cheers
Jannis

Hi Jannis,

Thanks for responding.

It isn’t even working with !important tags. And I’m sure the code functions because it works in inspector.
I’m just using the content editor custom CSS to insert this code. No custom stylesheets or anything.

I’m not sure what you mean by enqueued/dequeued though.

Hey buddy,

thanks for the answer.
I’ve encountered a similar issue a few month earlier.
Could you check if there are some console error’s if you visit the site as a guest from the frontend?
I know, that in my case there were some corrupt js files, wich are causing the error in the frontend. It has also worked inside cornerstone because something with the execution was different.

Try the following:

  1. Check the site as a normal user from the frontend.
  2. Check the console for js related errors
  3. If there are some, you should fix them and try it again.

Cheers
Jannis

No console errors. Normal frontend. :confused:
Hopefully Themeco staff will have a solution.
Thanks for your help though.

You can also send me your site. I’ll check the error out when I’m back on my notebook :slight_smile:

@TheOwnplay - Thanks for helping out.

@waggle

To assist you with this issue, we’ll first need you to provide us with your URL. This is to ensure that we can provide you with a tailored answer to your situation. Once you have provided us with your URL, we will be happy to assist you with everything.

Thank you.

http://wagglecompany.wpengine.com/sign-up/

Thanks @paul.r

Specifically the things that aren’t working are border, font, and color styling for inputs.

Hi there,

Please add this code to your child theme’s functions.php to stop X’s gravity form CSS from loading.

add_action('init', 'no_x_gravity_form_css', 9999999);
function no_x_gravity_form_css () {
wp_dequeue_style( 'x-gravity-forms' );
}

Thanks!

Unfortunately it didn’t work :confused:

It’s still loading this style sheet: http://wagglecompany.wpengine.com/wp-content/themes/pro/framework/css/dist/site/stacks/renew.css?ver=1.1.1 which is overriding the border and font styling. Obviously I don’t want to get rid of all of the X styling, but I do need to be able to style form inputs.

Thanks

Nevermind - I figured it out.

Great! Have a nice day! :slight_smile:

HI! Since I’m running into the same issue, would you mind to post your solution as well? Thanks!

Hi there,

Maybe he directly removed the CSS from renew.css file, you may do the same. You may use your hosting’s File Manager to edit the file. Make sure to back it up too.

Thanks!

Hi Rad,

that means loosing every single piece of styling. I’m trying to override just some of the styled elements.
I did openend another topic for that, but hopefully @waggle had a non-destructive solution figured out.

Hey @dhunink,

We’ll answer you on the thread you’ve opened up and hopefully, @waggle will reply here.

Thanks.