WordPress.org

Forums

Gravity Forms Mass Import
[resolved] Gravity Forms Mass Import not working in despite no obvious issues? (8 posts)

  1. orvn
    Member
    Posted 2 years ago #

    So I'm trying to import a CSV file that I exported right out of my old Gravity Forms install.

    I just moved the exact same form from my old site, but I'm getting this error: Warning: max() [function.max]: Array must contain at least one element in /home/advocate/public_html/build/wp-content/plugins/gravity-forms-mass-import/gravity-forms-mass-import.php on line 115

    Any idea what's wrong? (see screenshots)

    1 - http://i55.tinypic.com/343i7bk.jpg
    2 - http://i51.tinypic.com/2isfoza.png

    http://wordpress.org/extend/plugins/gravity-forms-mass-import/

  2. Have you try reaching out to the gravity forms folks on their support forum?
    They are usually very good. I've also had some help from them simply by using Twitter.

  3. aryanduntley
    Member
    Plugin Author

    Posted 2 years ago #

    Ya, looks like a bug with my code. Seems you must have at least one value in the lead table for that function to work. I should catch that potential error and give a default value of 1 or 0. For now, just make one entry into your form (some arbitrary entry, you can delete it later). Then import. Also, I can already tell that you are still going to have issues with your headers. There is a problem with the csv structure. Please read through the other support issues and compare the csv file you have to the structure my plugin requires.

  4. aryanduntley
    Member
    Plugin Author

    Posted 2 years ago #

    Also, take a look at your fields and their labels. There is something seriously wrong with your form. It looks like all the labels need to be moved up one field. Weird that you would be calling your name field (which has first and last name) "Name" and the address field (which has add1,2,city,state,zip,country) "Country". Go over the form you uploaded to make sure everything is correct. Then save it again just in case. Then make one arbitrary entry just in case that "max()" issue is still going to be there. Then check the Labels as they relate to the Type as listed when you select your form on my plugin. If all of that lines up correctly, then check the csv file to make sure it is correctly structured (utf-8 encoded, double-quote encased, comma delimited). Then upload the csv and you should be set.

  5. aryanduntley
    Member
    Plugin Author

    Posted 2 years ago #

    Looking further at your images, to save you some troubleshooting, the exported csv file you have of your previous entries is not going to work with my plugin. The name field (titled name) is split into two: Name(first) and Name(last). For my plugin, the correct csv format would be to make this one field : header = "Name" and the entries for that field should look like this: "John,Doe" "Jane,Kane" ",Anderson" "Jenny," and so on... People really do not seem to understand csv files and have a hard time grasping the simple fact that for my plugin you have to encase each field (whether it be a header or an entry) with double quotes. and that each field has to be separated by a comma (only, no space). I have also thoroughly explained the structure of advanced fields for the purpose of my plugin, eg.. name fields, multiple select, address fields, etc... . Please read through that carefully before you get frustrated with your first attempts at importing.

  6. orvn
    Member
    Posted 2 years ago #

    Hi Dunar, thanks for getting back to me so quickly! I really appreciate that.

    Creating a test entry got rid of the empty array error.

    I decided to re-create my name field to only contain "first name" (my plan was that I could edit the last names in afterward).

    Unfortunately I'm still getting invalid header errors on all the other fields: what's the best way to rectify this? http://i52.tinypic.com/vfjz1w.png

    This is my original CSV, before renaming the name field, by the way.

    I'm not frustrated at all, on the contrary I'm just really impressed with how quickly you responded and how comprehensive your answers are.

  7. aryanduntley
    Member
    Plugin Author

    Posted 2 years ago #

    I didn't get that csv file. email me at me@aryanduntley.com and send me the file. Also, with the csv file, send me another image of the label/type table my plugin gives you when you select the form. What I'll do is create the correct headers for you and the first entry row. Then it will be up to you to mimic that format for the rest of the csv file.

  8. orvn
    Member
    Posted 2 years ago #

    Looks like it interpreted by URL as a relative link because I didn't include the http://.

    Emailed you, thanks for all the help!

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Gravity Forms Mass Import
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic