gotrls_display_option_price [JS]

Updated 14 September 2026

On this page

Description

This filter decides whether the price of an option is shown next to its label.

Deprecated since v2.1.0. Use the “Price breakdown” setting instead (Content tab, Products panel), or the gotrls_product_breakdown_mode hook for one field. The default value of this filter now follows that setting, so a filter that returns a fixed value overrides what you chose in the settings.

Parameters

displayPrice | Bool. Follows the price breakdown setting

formId | Int

fieldId | Int

Return

Bool

Usage

Copy the below code to a HTML field inside your form (wrapped in script tags) or use the Code chest plugin.

<script type="text/javascript">
if ( typeof gform !== "undefined" ) {
    gform.addFilter( 'gotrls_display_option_price', function( displayPrice, formId, fieldId ) {
        return false; // Hide the option prices. Prefer the Price breakdown setting.
    } );
}
</script>

Since

version 2.0.0

Didn’t find what you were looking for?

Or contact support and I will help you out.

Scroll to Top