gotrls_product_breakdown_mode [JS]

Description

This hook can be used to overwrite the global breakdown mode for a specific product field

Parameters

productBreakdownMode| The current product breakdown mode.

form_id | Int

field_id | Int

Return

String. Return the breakdown mode. Should be one of ‘labels_prices’, ‘labels_only’, ‘disabled’.

Usage

The below code can be used to disable the breakdown for a field. Change fieldId 21 to your field ID.

Copy the below code to a HTML field inside your form or use the Code chest plugin

<script type="text/javascript">
if ( typeof gform !== "undefined" ) {
    gform.addFilter('gotrls_product_breakdown_mode',function(mode, formId, fieldId){
        if( fieldId == 21 ) {
            return 'disabled';
        }
    return mode;						
});
} 
</script>

Since

version 2.1.0

Scroll to Top