iContact for Gravity Forms
[resolved] Cannot view more than 20 lists (3 posts)

  1. Christopher
    Posted 3 years ago #

    My iContact account has a lot of lists -- more than 20. Unfortunately it seems that the plugin can only display the first 20 when creating a feed, and there doesn't appear to be any kind of paging functionality to allow me to see more than that.

    I suspect this is something to do with an API limit on the number of returned items, is there a quick fix just to make all the lists appear on the same page? Thanks!


  2. Christopher
    Posted 3 years ago #

    As suspected there are limit and offset parameters in the icontact api class (gravity-forms-icontact/api/iContact.class.php) which haven't been specified in the API call, so it appears to default to 20 items. I changed this line in the getLists() method:

    $response = $this->callResource("/a/{$this->accountId}/c/{$this->clientFolderId}/lists",'GET');

    to this:

    $response = $this->callResource("/a/{$this->accountId}/c/{$this->clientFolderId}/lists?limit=50",'GET');

    It's only a quick hack and hardcoding a limit isn't recommended, but at least now I can select from any of my lists. Hopefully helps out anyone else with the same problem.

  3. Zack Katz
    Plugin Author

    Posted 3 years ago #

    I added this to the plugin; thanks for providing the fix! I did, however, make the limit 999, just in case :-)

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • iContact for Gravity Forms
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic