Using Gravity Forms ‘gform_order_label’ PHP filter

The gform_order_label filter in Gravity Forms allows you to modify the “Order” heading displayed on the entry detail page or when sending the order information via email.

Usage

Applies to all forms:

add_filter('gform_order_label', 'change_order_label', 10, 2);

Applies to a specific form (e.g., form ID 5):

add_filter('gform_order_label_5', 'change_order_label', 10, 2);

Parameters

  • $label (string): The label to be filtered.
  • $form_id (integer): The current form’s ID.

More information

See Gravity Forms Docs: gform_order_label

Examples

Change the default “Order” label to “Estimate”

add_filter('gform_order_label', 'change_order_label', 10, 2);

function change_order_label($label, $form_id) {
    return 'Estimate';
}

Change the “Order” label to “Invoice” for form ID 5

add_filter('gform_order_label_5', 'change_order_label', 10, 2);

function change_order_label($label, $form_id) {
    return 'Invoice';
}

Customize the “Order” label based on form ID

add_filter('gform_order_label', 'change_order_label', 10, 2);

function change_order_label($label, $form_id) {
    if ($form_id == 1) {
        return 'Quote';
    } elseif ($form_id == 2) {
        return 'Estimate';
    } else {
        return 'Order';
    }
}

Append the form ID to the “Order” label

add_filter('gform_order_label', 'change_order_label', 10, 2);

function change_order_label($label, $form_id) {
    return $label . ' - Form ' . $form_id;
}

Change the “Order” label to “Reservation” only for form ID 3

add_filter('gform_order_label_3', 'change_order_label', 10, 2);

function change_order_label($label, $form_id) {
    return 'Reservation';
}