Hello everyone!
I need help.
I have a lot of custom of Gravity Forms.
The task is to deactivate another field when changing to a certain value of a certain field. This happens through JS.
For example, I need to hide the Credit Card field if the total is zero.
I know there is an article https://docs.gravityforms.com/gform_pre_render/?&_ga=2.218535321.1492942963.1604055018-108432032.1590751374#4-configure-conditional-logic
But that doesn’t help, changes take place dynamically in JS.
I know there is the conditional_logic.js file but I could not figure it out.
Just hiding the field doesn’t help.
gform.addFilter('gform_product_total', function(total,formId){
if(total < 0.51){
total = 0;
$('#field_47_49').hide();
//gf_do_action('hide', '#field_47_49', 0, window.gf_form_conditional_logic[47]['defaults'], false, null, 47);
} else {
$('#field_47_49').show();
//gf_do_action('show', '#field_47_49', 0, window.gf_form_conditional_logic[47]['defaults'], false, null, 47);
}
return total;
});
Help me find solutions. Where to dig? You can have plugins, articles with similar functionality.