Using Gravity Forms ‘gform_getresponse_limit_pre_get_campaigns’ PHP filter

The gform_getresponse_limit_pre_get_campaigns Gravity Forms PHP filter can be used to modify the number of campaigns that are retrieved when creating a feed in the Gravity Forms GetResponse Add-On. The default number of campaigns is 100.

Usage

add_filter('gform_getresponse_limit_pre_get_campaigns', 'your_function_name');

Parameters

  • $limit (int): Number of campaigns to be retrieved from GetResponse.

More information

See Gravity Forms Docs: gform_getresponse_limit_pre_get_campaigns

Examples

Increase the number of campaigns returned by GetResponse to 350

add_filter('gform_getresponse_limit_pre_get_campaigns', function($limit) {
    return 350;
});

Decrease the number of campaigns returned by GetResponse to 50

add_filter('gform_getresponse_limit_pre_get_campaigns', function($limit) {
    return 50;
});

Retrieve all campaigns by setting the limit to a high number

add_filter('gform_getresponse_limit_pre_get_campaigns', function($limit) {
    return 10000;
});

Double the number of campaigns retrieved

add_filter('gform_getresponse_limit_pre_get_campaigns', function($limit) {
    return $limit * 2;
});

Set the number of campaigns retrieved based on a custom option

add_filter('gform_getresponse_limit_pre_get_campaigns', function($limit) {
    $custom_limit = get_option('my_custom_campaign_limit', 100);
    return $custom_limit;
});