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.

force a style on a specific field to ALL forms (not just one form)

  1. I want to force uppercase to one of my fields. i found this helpful line in your documentation:

    #field_XX_X.gfield .gfield_label {color: red}

    but i have more than one form and i want to force the style on all of them.

    possible?

    Posted 12 years ago on Wednesday February 8, 2012 | Permalink
  2. You should be able to apply a class to the field you want to have this particular style and then use that class on each form.

    Posted 12 years ago on Wednesday February 8, 2012 | Permalink
  3. hmmm... i've tried that too, but i thought i was doing something wrong.

    i placed the following in my stylesheet, in the gf form.css and the gf print.css:
    .uppercase { text-transform: uppercase; }

    and then set the css class name to "uppercase" in the advanced tab (not with the quotes).

    have i missed something?

    Posted 12 years ago on Wednesday February 8, 2012 | Permalink
  4. Can you provide a link to your form so I can check it out? You should also be placing styles into your theme's stylesheet because when you update the plugin, your modifications to the plugin-level stylesheets will get overwritten.

    Posted 12 years ago on Wednesday February 8, 2012 | Permalink
  5. Without seeing your form it's hard to say what it is. Like Rob says, there's no need to modify the default forms.css file and it's actually discouraged because updates will overwrite that file.

    You may need to just use better CSS specificity to override styles defined in your theme.

    [css]
    body .gform_wrapper .gform_body .gform_fields .gfield.uppercase,
    body .gform_wrapper .gform_body .gform_fields .gfield.uppercase input,
    body .gform_wrapper .gform_body .gform_fields .gfield.uppercase label {
    	text-transform: uppercase !important
    }

    The "!important" declaration may or may not be necessary.. again, since I can't see your form yet I can't tell you for sure.

    http://www.gravityhelp.com/documentation/page/CSS_Targeting_Samples

    Posted 12 years ago on Wednesday February 8, 2012 | Permalink