Viewing 15 replies - 1 through 15 (of 16 total)
  • I’m trying to do the same, Michael gave me a response here
    I’m not a php expert by any means but I’m trying to wrap my head around it now as far as using php microtime and then filtering it. And I’m not a php expert by any means so it’s not easy.

    Plugin Author Michael Simpson

    (@msimpson)

    I starting looking into supporting this in the code itself directly this past weekend. I want to be able to have something like filter=”submit_time>last week”

    I may be able to put something out to help you guys but the end of the week. So if you can hang in there a bit you may be able to avoid the headache.

    Thread Starter dmysticd

    (@dmysticd)

    Thanks for the info both of you. I could probably figure out the php instructions / creating my own shortcode, but if Michael is working on something that might be ready in a week or so (that will be much easier to use), then I’ll be patient and wait for that.

    I’ll do my best to be patient. Thank you Michael!
    I also plan on donating to the plugin as soon as my site goes live.
    thanks again

    Plugin Author Michael Simpson

    (@msimpson)

    I’m putting out version 2.2 today with this functionality. Read this.

    awesome thanks Michael! Quick question tho if I wanted to filter results to show submissions from the past 7 days AND a search term of something like “splash” how would I do that?

    Plugin Author Michael Simpson

    (@msimpson)

    You can’t mix “filter” and “search” but you can put something like
    [cfdb-table form=”Contact form 1″ filter=”submit_time>last week&&field2=splash”]

    See filter

    I can’t seem to get my filter by submit time to work at all. I originally thought it was my shortcode but even testing results submitted to be filtered within the last 5 min still produces the same result. I tried it on cfdb-table and cfdb-html and of course my own shortcode. I don’t mean to hijack the thread I just can’t seem to get this to work.

    Plugin Author Michael Simpson

    (@msimpson)

    Post an example cfdb-table short code.

    What version of PHP are you running (you can find listed on the Database Options page)?

    Thread Starter dmysticd

    (@dmysticd)

    Hi Michael,
    This new feature is working beautifully for me. Thank you so much!

    (Last week I posted some additional details in a character encoding issue thread. Wondering if you had a chance to take a look)

    php version 5.2.17
    mysql version 5.1.58-community-log
    fast secure contact form version 3.0.4
    contact for to db extension version 2.2

    filter of one day:
    [cfdb-html form="thelist" filter="submit_time<1 day"]${from_name}<br />[/cfdb-html]
    filter of one week:
    [cfdb-html form="thelist" filter="submit_time<1 week"]${from_name}<br />[/cfdb-html]
    [cfdb-table form="thelist" filter="submit_time<1 week"]

    all three of the above display the same results (in different formats obviously) and it is showing all 8 submissions I’ve made some of which are older than a week. if you want to see the test page it is here

    when I test the opposite of submit_time>1 day or 1 week it shows nothing

    filter of one day:
    
    [cfdb-html form="thelist" filter="submit_time>1 day"]${from_name}<br />[/cfdb-html]
    filter of one week:
    
    [cfdb-html form="thelist" filter="submit_time>1 week"]${from_name}<br />[/cfdb-html]
    
    [cfdb-table form="thelist" filter="submit_time>1 week"]
    Plugin Author Michael Simpson

    (@msimpson)

    Use “-1 day” instead of “1 day”.

    “1 day” gets interpreted as “one day from now”, i.e. tomorrow. “submit_time>1 day” implies form submissions received more recently than tomorrow…so you get nothing.

    It’s best to test in the Database Short Code page, it will show you the date you value resolves to.

    I was up way too late trying to figure out what I was doing wrong lol thank you so much! I’m gunna send a donation your way, go get your self a 12 pack! haha will be sure to bother you if I mess anything else up.

    I’m having the same problem on two different sites. My shortcode is:
    [cfdb-table form=”test” filter=”submit_time=-1 day”]
    My information is:
    System Linux n11 3.2.6mtv10 #1 SMP Wed Apr 4 09:28:15 PDT 2012 x86_64
    PHP Version 5.3.13
    MySQL Version 5.1.61-rel13.2
    I’ve also tried “last week” “1342587972” as values, but no go.
    I’ll double your beer allotment if you can help me on this one.

Viewing 15 replies - 1 through 15 (of 16 total)
  • The topic ‘[Plugin: Contact Form 7 to Database Extension] filter by submit_time’ is closed to new replies.