### [How to Set a Currency Symbol Before a Single Item Field](https://wpforms.com/developers/how-to-set-a-currency-symbol-before-a-single-item-field/)

**Published:** July 19, 2023
**Author:** Editorial Team

**Excerpt:** This tutorial will show you how you can automatically set a currency symbol before the Single Item form field using JavaScript. 

**Content:**

## Introduction

Would you like to set a currency symbol before a **Single Item** payment field? By default, when you use this field and the **Item Type** is set to **User Defined**, there is no currency symbol to show.

![there is no currency symbol by default when using the User Defined Single Item payment field](https://wpforms.com/wp-content/uploads/2023/07/wpforms-currency-symbol-single-item-field-before.jpg)

However, in this tutorial, we’ll show you how you can achieve this using a small script.

## Creating your form

To begin, create a new form and add your fields.

If you need help in creating your form, [please review this useful documentation](https://wpforms.com/docs/creating-first-form/ "Creating Your First Form").

![begin by creating your form and adding your fields](https://wpforms.com/wp-content/uploads/2023/07/wpforms-add-currency-symbol-creating-form.jpg)

## Setting the Item Type

Once you’ve added your other fields to your form, be sure to add the **Single Item** form field found under the **Payment Fields** inside the form builder. Once added, set the **Item Type** to **User Defined**.

![add the Single Item payment field and set the Item Type to User Defined](https://wpforms.com/wp-content/uploads/2023/07/wpforms-add-single-item.jpg)

## Adding the snippet

Now that the fields are set, it’s time to add the snippet to your site. For any assistance in how and where to add snippets to your site, [please review this tutorial](https://wpforms.com/developers/how-to-add-custom-php-or-javascript-for-wpforms/ "How to Add Custom PHP or JavaScript for WPForms").

```

/**
 * Set a currency symbol in the Single Item payment field
 *
 * @link https://wpforms.com/developers/how-to-set-a-currency-symbol-before-a-single-item-field/
 */

function wpf_add_dollar_symbol_to_singleitem() {
    ?>

**Categories:** Tutorials

**Tags:** Javascript, JS

---

