File Upload Template: How to Change Font Weight of Words in Footer

Good Day!

We’re using Gravity Forms’ File Upload element. On the front end, the footer displays the following terms: “Accepted file types:”, “Max. file size:”, and “Max. files:”

How can we change the font weight of these terms? A CSS code (or similar) would be appreciated. (see below)

Thank you!


gravity-forms-uploads-font-weight

Hi Jonathan. I don’t see any filters that will allow you to alter that, and you can’t use a string replacement plugin like Say What to output HTML as a replacement. The whole message from beginning to end is in one span, so you won’t be able to alter the individual pieces (like Accepted file types) separately from the actual file types.

How about hiding the Gravity Forms output altogether with this CSS:

span.gform_fileupload_rules {
    display: none;  
}

Then adding an HTML field right after the file upload field that contains the same information, but formatting with your own HTML markup. Would that work for you?

1 Like

Hi Chris,

Brilliant. It worked. Thank you.

The alternate solution you provided worked like a charm with a small change. We modified your CSS code as shown below (“span” not required)

.gform_fileupload_rules {
    display: none;  
}

Also, we created the HTML element you recommended with the following code:

<p style="margin-top:-24px!important;margin-bottom:-35px!important"><b>Accepted File Types:</b> doc, dxf, dwf, jpg, jpeg, jpm, pjpeg, png, pdf, ppt, pub, txt, vsdx, xls, xml | <b>Max. File Size:</b> 5 MB | <b>Max. No. Files:</b> 5</p>

Result:

gf-upload-form-footer-with-modifications

Caveat:

The only drawback of using this method is that file error messages and uploaded files are now placed between the bottom of the form and the new footer as shown below. We can live with that :slight_smile:

gf-upload-form-footer-with-modifications-caveat

One Final Question: (if you don’t mind)

Is their any way we can change a GF parent file to position the modified footer immediately below the upload field?

Again, thanks a million!

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

© 2008 - 2021. Gravity Forms is a project by Rocketgenius Inc.