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.

Controlling look of the forms

  1. kamin
    Member

    I purchased the developers version with the purpose of replacing my previous form builder program which has some limitations. I do like many robust features with Gravity Forms (GF). However, one limitation GF seems to have is the ability to control the look (fonts, colors, spacing, etc.) without having to edit css files. The idea of plug-ins is to save programming time, and forms software should have this most basic feature using a user-interface.

    My old free forms program had this ability, so I want to believe GF has it. I have searched the forums and can only find references to edit css files. Please advise if there is a way to do this most basic feature without being a css editor.

    Thank you for your help.

    Posted 11 years ago on Tuesday February 19, 2013 | Permalink
  2. Styling the forms is done by adding CSS to your theme's stylesheet. There are no themes or skins or anything like that built in to Gravity Forms. Gravity Forms are designed to inherit your theme's look and feel, not stand out from it. Here is a comprehensive guide to styling every element in a Gravity Form: http://www.gravityforms.com/features/styles-layout/

    If you need help with specific styling issues with a form on your site, please post a URL to the page on your site where the form is embedded, and let us know which elements you want to change, and how, and we will help you with the CSS.

    Posted 11 years ago on Tuesday February 19, 2013 | Permalink
  3. kamin
    Member

    Thank you for your reply. But, I see no comprehensive guide. Your link takes me to the sales portion of the site advertising features in general. Am I missing a link you intended within that page?

    Posted 11 years ago on Tuesday February 19, 2013 | Permalink
  4. David Peralty

    Here is the Design and Style documentation - http://www.gravityhelp.com/documentation/page/Design_and_Layout

    Posted 11 years ago on Tuesday February 19, 2013 | Permalink
  5. Sorry, I posted the wrong link. My apologies.

    Posted 11 years ago on Tuesday February 19, 2013 | Permalink
  6. kamin
    Member

    I appreciate the correction. So far, I can't find anywhere where it states what file(s) to edit. Please advise. Thank you.

    Posted 11 years ago on Tuesday February 19, 2013 | Permalink
  7. You will add the new styles you want to apply to the forms in your theme or child theme's stylesheet (normally style.css). Some themes want the custom CSS in another file. But the CSS is always added to your theme and with specific enough selectors to override the default theme and default Gravity Forms styles.

    Posted 11 years ago on Tuesday February 19, 2013 | Permalink
  8. kamin
    Member

    I am not able to make this work so far. Can you please provide a couple of examples that will show me proper usage? Thank you.

    Posted 11 years ago on Monday February 25, 2013 | Permalink
  9. kamin
    Member

    I should be more specific. By examples, I mean example CSS code that references GF items. I am guessing my usage is not being recognized by the GF program. I am using my theme's CSS file. Thank you.

    Posted 11 years ago on Monday February 25, 2013 | Permalink
  10. kamin
    Member

    Plus, how does it know which form to apply to? I don't want the CSS styles to affect all forms the same way.

    Posted 11 years ago on Monday February 25, 2013 | Permalink
  11. @kamin have you ever come accross a Firefox plugin called Firebug? It is an awesome tool for tweaking CSS. you load your page in the browser and you can edit the CSS "live" in the browser. You an edit or turn off existing styles and create new rules. Once you are confident with this tool it's value is well worth the effort. When you are sure that you are happy with any adjustments made used in Firebug can be applied to the actual stylesheets in your usual editor.

    Hop that helps

    Martin

    PS the last thing I would want is for CSS to be handled by a plugin.

    Posted 11 years ago on Monday February 25, 2013 | Permalink
  12. kamin
    Member

    Yes, I just used Firebug today to now figure out some things. Thank you for the suggestion!

    I differ on the plug-in. The idea of plug-ins is to shortcut much of the programming work. CSS can still be used to go beyond it. But, many basic form design features should be through the UI first. Otherwise, I am not saving much time. Heck...I used FrontPage back in the day to do more form design without initial coding. Why can't providers do that today? Maybe someone at GF can put it in a suggestion box for me. :)

    Now, I just need GF support to reply to my question above about how to direct a CSS attribute to a specific form so it doesn't affect all forms on the site where necessary. Also...for a specific field's attributes.

    Posted 11 years ago on Monday February 25, 2013 | Permalink
  13. @kamin, this page details targeting each item in the Gravity Forms form output: http://www.gravityhelp.com/documentation/page/CSS_Targeting_Samples

    Some general tips:

    • If you want to target all elements in a specific form, use this as the beginning of your selector:
      [css]
      body #gform_wrapper_ID
      /* where ID is a literal form ID, like this: */
      body #gform_wrapper_7
      /* that would apply to all elements in form 7 */
    • If you want to apply a specific style to all Gravity Forms on your site, you can use this as the beginning of your selector:
      [css]
      body .gform_wrapper
      /* use with no form ID (_ID) and as a class, prepended by a . vs a # */
    • If you view the source of the page where your form is embedded, you will see the unique ID for each field, or the more general class for that field.

    Those are some basics. If you provide a link to a page on your site with a form, and one element you want to target specifically, we can show you how to do it for one form, or all forms.

    Posted 11 years ago on Tuesday February 26, 2013 | Permalink
  14. kamin
    Member

    Thank you for that information. I would have replied sooner, but this thread is broken for sending me alerts in email.

    For an element specific change, please just provide a generic example. I don't want to publish live links to live sites on a public forum in this case.

    Thank you for your help.

    Posted 11 years ago on Tuesday February 26, 2013 | Permalink
  15. To target a specific element in a form:

    [css]
    /* See this page:
    gravity.chrishajer.com/country-of-origin/
    this will target all radio button inputs
    in form id 3 only (#gform_wrapper_3 */
    body #gform_wrapper_3 ul.gfield_radio li input[type="radio"] {
        display:none;
    }
    
    /* this will target all radio buttons in all */
    /* Gravity Forms */
    body .gform_wrapper ul.gfield_radio li input[type="radio"] {
        display:none;
    }

    Does that give you enough to go on? If you view the source of the page where your form is embedded, you can see the class and ID details for the elements you want to target. And to make them form specific, you would use the ID for the form #gform_wrapper_77, for example, then follow with the specific elements you want to target. To apply the same style to all forms, use the class for a Gravity Form .gform_wrapper.

    Posted 11 years ago on Saturday March 2, 2013 | Permalink