# Convert Values to UPPERCASE (Option A)

![an Applicant Name converting to UPPERCASE after leaving the field](https://3087753818-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzNSSXajDFpzOv2IhIv%2F-MeW_USj_9SpnZsxbzn6%2F-Me_tT0arlDDXmLaSmHh%2Fimage.png?alt=media\&token=df147fe9-39ed-4b40-9301-bead61108f2d)

### The JS

The function

```javascript
/*****************************************/
/*** Convert Field/Inputs to UpperCase ***/
/*****************************************/
$(document).on("knack-page-render.any", function (event, page) {
```

We create a handler that uses the focusout function. We can create one that applies to an entire field type such as the Name field (i.e. Customer Name and Reviewer Name)

```javascript
// All Name Fields
$(".kn-input-name input").focusout(function () {
  this.value = this.value.toUpperCase();
});
```

or we can target a specific field by using the Knack Field ID.

```javascript
// License Plate 1
$("input#field_232").focusout(function () {
  this.value = this.value.toUpperCase();
});
```

and dont forget to close the function.

```
})
```

Example of full code block

```javascript
/*comment*/
$(document).on('knack-page-render.any', function(event, page) {
  $("input#field_232").focusout(function () {
    this.value = this.value.toUpperCase();
  });
})
```

### The CSS

None needed 😎

### How to Implement

Adjust field input type or Field ID and you are set 👍

```
".kn-input-name input"
```

```
"input#field_232"
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://atd-dts.gitbook.io/atd-knack-operations/knack-code/looks/convert-values-to-uppercase-a.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
