# Change the Value in Field to CAPITAL Letters \[RESOLVED\]

**URL:** <https://community.gravityforms.com/t/change-the-value-in-field-to-capital-letters-resolved/11727>\
**Category:** Get Help\
**Tags:** strtoupper, capitalize, uppercase, gform\_save\_field\_value\
**Created:** [January 27, 2022, 4:25pm UTC](https://community.gravityforms.com/t/change-the-value-in-field-to-capital-letters-resolved/11727 "2022-01-27T16:25:15Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Fairsuchen](https://sea2.discourse-cdn.com/flex020/user_avatar/community.gravityforms.com/fairsuchen/32/4476_2.png) [@Fairsuchen](https://community.gravityforms.com/u/Fairsuchen)\
**Post date:** [January 27, 2022, 4:25pm UTC](https://community.gravityforms.com/t/change-the-value-in-field-to-capital-letters-resolved/11727/1 "2022-01-27T16:25:15Z")

</div>

Hi,  
i need an Function to CAPITALIZE or UPPERCASE the Value in Fields.

Why?:

1. My client enters the details from an Car license plate into an Form.
2. I need to create an Google Drive Folder with the Name
3. The Structure of the Cr License Plate is for example. HH-IM-444  
So you see, that the Letters has to be in Capital Letters
4. I want to make 3 Fields. 1 for ( HH ) then “-” Field 2 for (IM) then “-” and then the Numbers
5. The Problem is, that if the Field 1 is filled with Hh, it is not in the same structure. So i want to convert “Hh” or “hh” to “HH” and so on.

I found the way to my solution, but as far as I understand, it is only for capitalizing the the First Letter.

Looking forward for your Feedback  
Regards  
Gerrit

---

<div class="post-metadata">

**Author:** ![uamv](https://sea2.discourse-cdn.com/flex020/user_avatar/community.gravityforms.com/uamv/32/1412_2.png) [@uamv](https://community.gravityforms.com/u/uamv)\
**Post date:** [January 27, 2022, 4:48pm UTC](https://community.gravityforms.com/t/change-the-value-in-field-to-capital-letters-resolved/11727/2 "2022-01-27T16:48:16Z")

</div>

You can do this by hooking into the filter [gform\_save\_field\_value](https://docs.gravityforms.com/gform_save_field_value/). Specifically, see example [4. Uppercase Value](https://docs.gravityforms.com/gform_save_field_value/#h-4-uppercase-value) for a basic example of setting all text inputs to uppercase. In your case, you’ll probably want to look at usage for targeting specific fields and then calling upon a function for uppercasing those values. Something like this would target **Field ID 4** and **Field ID 7** on **Form ID 18** :

```auto
add_filter( 'gform_save_field_value_18_4', 'uppercase_field_value', 10, 6 );
add_filter( 'gform_save_field_value_18_7', 'uppercase_field_value', 10, 6 );

function uppercase_field_value( $value, $entry, $field, $form, $input_id ) {

    GFCommon::log_debug( __METHOD__. ': running.' );
    return strtoupper( $value );

}

```

---

<div class="post-metadata">

**Author:** ![chrishajer](https://sea2.discourse-cdn.com/flex020/user_avatar/community.gravityforms.com/chrishajer/32/88_2.png) [@chrishajer](https://community.gravityforms.com/u/chrishajer)\
**Post date:** [January 27, 2022, 6:33pm UTC](https://community.gravityforms.com/t/change-the-value-in-field-to-capital-letters-resolved/11727/3 "2022-01-27T18:33:19Z")

</div>

Closed on January 27, 2022, 6:33pm UTC


