PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Add CSS class to submit buttons

  1. Alex
    Member

    I want to add a CSS class to specific forms. It seems I can do this using http://www.gravityhelp.com/documentation/page/Gform_submit_button but this limits me as I need to define the submit button text outputs per form.

    It seems odd that I can't just add a CSS class to the submit button itself considering all the other ways the forms can be customised. Is there a way I can use Gform_submit_button and have it output.

    Posted 11 years ago on Tuesday November 13, 2012 | Permalink
  2. David Peralty

    The submit button is controlled in the form creation, and as such it isn't a separate object that has options itself. So you have to use the hook above if you want to add a CSS class to it.

    Posted 11 years ago on Tuesday November 13, 2012 | Permalink
  3. Alex
    Member

    I assume I'll ahve to do this per form then? Seems like the long way round :(

    Posted 11 years ago on Tuesday November 13, 2012 | Permalink
  4. David Peralty

    You could apply a set of CSS rules to all form submit buttons from Gravity Forms, but you can't change the classes applied to a submit button site wide.

    You could use:
    .gform_footer input[type="submit"]

    Posted 11 years ago on Tuesday November 13, 2012 | Permalink