Triggering gpnf_entry_limit_max on change of a product

Hi all. I have a Product (radio buttons) that when selected, determines how many seats someone can have at an event. Gold Sponsor gets 10 seats, Silver 8 etc….

When the user selects that Product I need to pass that number (its value, I have it) to be the max number of entries for the nested form.

gform.addFilter( ‘gpnf_entry_limit_max’, function( max, currentFormId, currentFieldId ) {
// Check if it is the target form and field
if ( currentFormId == 89 && currentFieldId == 4 ) {
max = $(“#input_89_30”).val(); // Set your custom limit
console.log(max);
}
return max;
});

That totally does it on page load but how can I trigger it each time a check box is clicked? I have added it to a function attached to the click but it won’t trigger inside another function.

And thank you in advance!

Hi Jeynon,

I think we’ll need to take a closer look at your setup to guide you on how to do this.

If you’re a Gravity Perks customer, can you drop us a line so we can take a look at your form setup?