### [How to Customize Payment Form Labels](https://wpforms.com/developers/how-to-customize-payment-form-labels/)

**Published:** December 4, 2023
**Author:** Editorial Team

**Excerpt:** This tutorial will show you how to customize the Payment form labels using PHP to remove the hyphen separators from displaying. 

**Content:**

## Introduction

Would you like to customize the **Payment** form labels by removing the hyphen that appears when you choose to show the price after the label? The default behavior of the **Payment** fields includes a hyphen between the label and the displayed price, which might not always align with your design preferences.

![by default, when you enable to display prices after the label, the hyphen will separate the label and the price](https://wpforms.com/wp-content/uploads/2023/12/default-hyphen-payment.jpg)

Fear not! In this tutorial, we’ll guide you through the process of customizing your **Payment** field labels. Whether you want to eliminate the hyphen altogether or replace it with a different character, we’ve got you covered. Discover two methods—snippet-free and PHP-based—to effortlessly achieve the label and price display that suits your form aesthetics.

## Creating the form

To begin, we’re going to create a standard order form with all of our required fields that will accept payments. If you need any assistance in creating this type of form, [please check out this useful guide](https://wpforms.com/docs/how-to-create-a-payment-form-in-wpforms/ "Creating a Payment Form").

![create the form and add your fields.](https://wpforms.com/wp-content/uploads/2023/12/wpforms-remove-hyphen-create-form.png)

## Removing the Hyphen

#### Method 1: Snippet-free

As promised, if you want to change or just remove the hyphen completely but still show the price in the field, manually type out the label exactly how you want it to appear.

You’ll notice for this method, there is no need for any code snippet and we’ve also made sure the **Show price after item labels** is disabled. You just simply type out the label exactly as you want it to appear on your form which can be without the hyphen or replacing the hyphen with a colon as we did in this example.

![there is no need to enable the option to show the price after item labels since we are manually displaying the label and price exactly the way we want it to show without any code](https://wpforms.com/wp-content/uploads/2023/12/new-wpforms-remove-hyphen-manually.png)

#### Method 2: PHP-based

If you’d like to use PHP to remove or change this hyphen, you’ll first need to click on your **Payment** fields and on the **Advanced** tab of each field, click to enable **Show price after item labels** so that the form will automatically place your label and price for the item separated by the hyphen.

![enable the option on each of the payment fields to Show price after item labels](https://wpforms.com/wp-content/uploads/2023/12/wpforms-show-price-after-label.jpg)

Once the form is saved, it’s now time to add the snippet. Just copy and paste this snippet to your site.

```

/**
 * Remove or change hyphen payment form labels
 *
 * @link https://wpforms.com/developers/how-to-customize-payment-form-labels/
 */

function wpf_remove_hyphen_separator() {
    ?>

**Categories:** Tutorials

**Tags:** payment, PHP

---

