WordPress.org

Ready to get started?Download WordPress

Forums

Contact Form DB
[resolved] [Plugin: Contact Form 7 to Database Extension] Date/time stamp? (16 posts)

  1. lauragb
    Member
    Posted 3 years ago #

    This plugin is terrific and provides much-needed functionality to Contact Form 7. It works great, with one small exception... I'd love to see the TIME of submission included in the "Submitted" column. Sometimes people realize they've made a mistake and go back to submit the form again. With the data that's provided, you can't tell which is the newer record. Thanks!!

  2. Michael Simpson
    Member
    Plugin Author

    Posted 3 years ago #

    The current released version is 1.2.1. I put in a fix to show the time in version 1.2.2. I have not made it an official release yet, but you can download it and try it out:
    Download Version 1.2.2

  3. lauragb
    Member
    Posted 3 years ago #

    Works like a charm! Thanks so much!!

  4. kmaz
    Member
    Posted 3 years ago #

    Hi,
    Thanks for this plugin.
    I modified the layout so it uses now the standard WordPress layout (like the posts list page).
    Let me know if you want me to send you the CF7DBPlugin.php modified and where I can send you that.

  5. Michael Simpson
    Member
    Plugin Author

    Posted 3 years ago #

    Sure, send me the code at michael dot d dot simpson at gmail dot com

  6. Michael Simpson
    Member
    Plugin Author

    Posted 3 years ago #

    As of version 1.4, the submitted time format is configurable. Look in Database Options in the Admin panel.

  7. wreston
    Member
    Posted 3 years ago #

    Hi Michael,

    I've got two questions:

    1. How can I offset display of the "submitted" time, so that when using [cfdb-table form="my_form" class="my_class" show="Submitted,field1,field1"] to display a table, it will show the local time (EST) vs. UTC time? (I just want to display the date/time in Y/m/d format.)

    2. If I use the shortcode shown above, I get 2 "Submitted" headings, with the values listed below the first heading. If I add hide="Submitted" before show="Submitted,... etc." the table is displayed correctly with one "Summitted" heading and its associated values. Is this "normal?"

    Thanks for your help!

  8. Michael Simpson
    Member
    Plugin Author

    Posted 3 years ago #

    1. First, in the Admin panel, Settings->General
    - Set "Timezone" to what you want (lot of times your server lives in a different timezone that you.)
    - Set "Date Format" to how you want to see it
    - Next, upgrade my plugin to version 1.6 which I am pushing today. Then go to "Database Options"->"Use Custom Date-Time Display Format" and make that "false". Then go look at your database submissions page and you should see them in your localtime format. This setting should apply to the shortcode output as well.

    2. I don't know why you would get the bogus "Summitted" heading. Did you ever have a form field named "Summitted"? Definitely not normal, but seems like there is a bad entry in the DB. If you want to venture into MySQL, you could delete such rows: delete from wp_CF7DBPlugin_SUBMITS where field_name = 'Summitted'

  9. wreston
    Member
    Posted 3 years ago #

    Hi Michael,

    Thanks for your response!

    I followed your instructions in #1 above, but still the submissions are appearing in UTC time. See this page for an example... http://www.tacmissileers.org/?page_id=3410

    Any other thoughts? Thanks...

  10. Michael Simpson
    Member
    Plugin Author

    Posted 3 years ago #

    Hmmm.... looks like it is not working like I expect. I'll have a closer look at how the date is being generated and get back to you. It may be something I have to patch.

  11. wreston
    Member
    Posted 3 years ago #

    Thanks!

    Something weird is definitely happening with the "Submitted" info time...

    I just tried exporting the test record in the example listed in my previous entry to Excel, using the "Excel CVS (UTF8-BOM)" option. When I did, the submitted date in the CSV file spanned two Excel columns. I've added screen captures to my test record... http://www.tacmissileers.org/?page_id=3410

    I appreciate your help!

  12. Michael Simpson
    Member
    Plugin Author

    Posted 3 years ago #

    Ahhh yes... this is a comma-separated value (CSV) format for Excel and there is now a comma is the the date ("February 5, 2011") and Excel interprets that as a field delimiter.

    I put in a fix for this. I'd appreciate it if you would test the unreleased version (install this zip). If its OK, I'll push and updated version later this week.

  13. wreston
    Member
    Posted 3 years ago #

    I installed the zip, but am still having the same problem. If I export to Excel using Excel TSV (UTF16LE-BOM), the date is exported in a different format, that does not contain a comma (e.g., "2/5/2011 11:27:00 PM"). Exporting this way works OK... Net, evidentally the problem only occurs when the exported date contains a comma...

    I think this comma problem is related to the 'bogus' Submitted heading I described earlier (my Question #2).

    -----

    RE my Question #1. Would it be feasible to add a 'time offset' option to the "Contact Form to DB Extension Settings" so that when displaying / exporting the "Submitted" time, it can be 'adjusted' for the desired timezone? I use a guestbook plugin (DMSGuestbook) and that how he makes it possible 'adjust' the time on guestbook submissions, for the local time zone. In my case, I'm UTC -5 hours.

    Thanks!!!

  14. Michael Simpson
    Member
    Plugin Author

    Posted 3 years ago #

    In your earlier post you tried UTF8-BOM. Does that work now? There may be an issue with UTF16LE-BOM that I need to fix *but* I'm suspicious that when Excel imports the data, it interprets that field as a date correctly but then gives it a different display format. I will investigate further...

    Instead of UTC-5, try using "New York" since that will adjust for daylight saving time. But that doesn't solve the general issue which I need to look at.

  15. Michael Simpson
    Member
    Plugin Author

    Posted 3 years ago #

    OK, try installing this again and see if it solves the timezone offset issue.

    Fox excel export, look at the .csv file that you download with a text editor (like Notepad) and you should see the right time format ("February 6, 2011 ...") then open it in Excel. See if Excel is changing the format of the dates. I think this is the case and if so, it's and Excel issue and I can't do anything about it.

  16. wreston
    Member
    Posted 3 years ago #

    Fantastic! That took care of the timezone problem and the export problem. Database entries now reflect the same timezone as selected via the WordPress General Timezone setting (in my case, New York) and... the Excel exports format the date without a comma (e.g., "2/5/2011 23:27" vs. "5-Feb 2011 11:27pm"), making sure they don't 'confuse' Excel.

    I really appreciate your help!!!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic