WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. c_turnbull
    Member
    Posted 1 year 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!

    http://wordpress.org/extend/plugins/gravity-forms-icontact/

  2. c_turnbull
    Member
    Posted 1 year 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
    Member
    Plugin Author

    Posted 1 year 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

About this Topic

Tags