Ready to get started?Download WordPress


Gravity Forms Mass Import
[resolved] date_created import (4 posts)

  1. wgstjf
    Posted 7 months ago #


    I have to import the date_created value as well as the fields from the form. I see that your script uses the now() value to populate this column. Could you point me in the right direction for using a field from the csv to populate the field instead?

    More than happy to 'Donate' towards your time on this, especially as I have a time pressure (i.e. pre Christmas) to get this sorted!

    Kind regards,



  2. azharmuhd
    Posted 7 months ago #

  3. dunar21
    Plugin Author

    Posted 7 months ago #

    There are two ways to do this. The first option would be to adjust the code so that instead of using now(), it uses a form field (which seems to be what you are asking). That would require code adjustment and because it's specific to you, I would not do this as an update.

    The other option would be to create another gravity forms field in your form and populate it with the dates you have in your csv. This may not work exactly as you may need, but I am not sure the context in which you need these dates.

    So, because I am not going to be making any updates to the plugin and this is a very custom order, we can discuss this off the forum aryanduntley@gmail.com.

  4. dunar21
    Plugin Author

    Posted 7 months ago #

    For those wishing to do something similar, this is a possible solution (though untested at this time):

    Try putting this as a replacement for line 422 in parcecsv.php:

    $daterow = $row['actualPostDate'];
    if($daterow){$_created_date = gmdate("Y-m-d H:i:s", strtotime($daterow;));}else{$_created_date = utc_timestamp();}
    $wpdb->query( $wpdb->prepare("INSERT INTO $entry_tracking_table (id, form_id, date_created, ip, source_url, user_agent, currency, created_by, status) VALUES (%d,%d,{$_created_date},%s,%s,%s,%s,{$_created_by},%s)",$_id, $_form_id, $_ip, $_source_url, $_user_agent, 'USD', 'active'));

    For this to work you have to create a field called "actualPostDate". You can make it a hidden field if you want.


You must log in to post.

About this Plugin

About this Topic


No tags yet.