Support » Plugin: Gravity Forms Directory » [Plugin: Gravity Forms Directory & Addons] Limit directory display by date range

  • Hi Zack,

    Excellent Addon first of all, but I’m sure you’ve heard that before 😛

    I have multiple forms all for capturing football results from each specific team to display on separate team pages through the season. I also have a single page where I want to display just the previous week’s results for every team. I’ll be using a separate directory line for each one but I want to be able to query just the last 7 days worth of results from each form.

    Is there a way to do that using the filters or tags within the directory query line, or can you only apply to the functions.php file and therefore will apply to all forms?

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

Viewing 15 replies - 1 through 15 (of 21 total)
  • Plugin Author Zack Katz

    (@katzwebdesign)

    Neat idea – I’ll look into how this might be added.

    Plugin Author Zack Katz

    (@katzwebdesign)

    It turns out I already added this functionality 🙂

    Okay, so you can add the start_date and end_date attributes to your [directory] code to filter by date, formatted like so: 2011-08-26 22:39:10 or 2011-08-26.

    [directory form="#" start_date="2011-08-26" end_date="2011-09-07"] would show listings from August 26 to September 9th.

    Zack, you legend!

    Thanks for that, it’s exatcly what I needed!

    Zack… Not working… I’ve set the filter and the form is still displaying all the results. Can you double check the format you gave me is correct?

    Plugin Author Zack Katz

    (@katzwebdesign)

    It worked for me…try using the latest version (3.0) of the plugin and let me know if that helps.

    V3 has killed the plugin!

    I cant approve any of the entries and nothing is displaying as a result. Some of the displays show a PHP fatal error!

    Fatal error: Call to undefined method GFDirectory::get_lead_details_table_name() in /home/********/public_html/wp-content/plugins/gravity-forms-addons/gravity-forms-addons.php on line 2190

    Plugin Author Zack Katz

    (@katzwebdesign)

    Thanks for reporting neo. I’ll fix tomorrow. If you change self::get_lead_table_name() to RGFormsModel::get_lead_table_name() and self::get_lead_details_table_name() to RGFormsModel::get_lead_details_table_name() around those lines, it should fix that error.

    Like I said, I’ll post the fix ASAP.

    I’ve amended self::get_lead_table_name() to RGFormsModel::get_lead_table_name() and the form displays now but still with no entries, and I get the following error when trying to approve any entries:

    Warning: Invalid argument supplied for foreach() in /home/redhouse/public_html/wp-content/plugins/gravity-forms-addons/gravity-forms-addons.php on line 1739

    Still cant approve anything, and the “approve” field is empty when you select it in the form editor (nothin under “properties”, “advanced” or “directory” and you can’t even edit the “Untitled” title.

    I love the plugin but I’m thinking this version need a little more work before it’s relaunched?

    Plugin Author Zack Katz

    (@katzwebdesign)

    Date filtering is better supported in version 3.0.1, just released – it has its own settings in the Insert Directory window.

    Also, please try the Approval process again once upgrading to 3.0.1 and let me know how it goes.

    Plugin Author Zack Katz

    (@katzwebdesign)

    @neo – This should be fixed in version 3.0.2, just released.

    There was code that was only compatible with Gravity Forms 1.6, and because I had installed 1.6 already, my database tables were altered by the upgrade. When I downgraded to test for compatibility, the database tables were still in their modified state. So that’s why I was unable to replicate the issue.

    Please upgrade to 3.0.2 and let me know if that fixes things for you.

    Almost, but not quite!

    At first the directory was not displaying but I started removing tags and when I removed the “sort” tag the entries appeared. So it looks like you’ve knocked off the sort tag to sort by specific column?

    Also, the date range is a little erratic. I have a a list of forms with multiple entries and I’ve set up a row of identical directories to pull the same date range from each form. Most of them display the correct entries for hose dates but there are a few which either include entries outside the date range, or display no entries where there are entries to display in the date range.

    Plugin Author Zack Katz

    (@katzwebdesign)

    I didn’t modify anything with the sort functionality – also it’s working fine for me. Regarding the date range, that’s done using the following MySQL code:

    datediff(date_created, '$end_date') <=0 and
    datediff(date_created, '$start_date') >=0

    That uses the date_created field for each entry. Not sure why yours may not be working properly. Sending me links helps; making me a login is better.

    Ahhhhh…. silly me. I have a date field and for some reason I thought it would set the range on that. It makes sense now, however that functionality doesn’t help me. Pity, but I’m guessing there’s no way to set the date range based on a user entered date field (maybe using the variable function)?

    I’ll test the sort issue again but it was def removing the directory when set.

    Tested the sort function again and still the same issue. When I don’t use sort, it works fine. As soon as I add sort=”8″, I get the “form has no entries” message…!??

    Plugin Author Zack Katz

    (@katzwebdesign)

    Try adding ?sort=8 to the URL and see if that works.

    Otherwise, send me a link or login. I can’t help more otherwise.

Viewing 15 replies - 1 through 15 (of 21 total)
  • The topic ‘[Plugin: Gravity Forms Directory & Addons] Limit directory display by date range’ is closed to new replies.