Posted on by

Matching Multiple Fields with CSV Import or Signup Submission

When importing a CSV, it is possible to configure it to match and update existing records. The same process can also be used when a new record is submitted via the signup form. Normally, this is done by matching a single identifying field such as an ID or email address.

In some cases, it’s desirable to perform the match based on multiple fields, such as the first and last name. In this tutorial, I will show you a plugin that lets you set up such a multiple-field matching check.

Setting Up the Match

This plugin works by checking a list of fields that must match an existing record in order for the incoming data to update the matched record in the database.

At the top of the plugin below, you’ll find an array, $match_field_list, where the list of fields you want to check is placed. When a record comes in, either from a signup form or from a CSV file, the contents of that new data is used to search for a record in the database that has the same values in all the fields in that list. If a match is found, the found record is updated with the values in the incoming data. If no match is found, a new record is created with the incoming data.

The Plugin

To use this plugin, click on the link below the code window, download the .zip file, then upload it using the “Add New” item in the admin Plugins menu. To set up the field you want to use for your application, edit the plugin using the plugin file editor. If the plugin file editor is not available, you’ll need to unzip it, edit it on your local machine, zip it, then upload and install.

6 thoughts on “Matching Multiple Fields with CSV Import or Signup Submission

  1. Hello,

    I love your plugin by the way but have hit a snag.. I want to upload a CSV file with club member data and wordpress.com will not allow this. How can I accomplish this upload.

    Chris Christian

    1. Hi Chris,

      I don’t know, I haven’t tried it on wordpress.com. Did you submit a support request to wordpress.com? It’s probably their configuration that’s stopping it.

      1. Hi,

        I talked to wp support through chat and they said I couldn’t upload a file into WordPress .com I will follow up again.

        1. Thanks, let me now if you learn anything new on this.

        2. Here is what I got from support… No other way to get support except through this chat.

          I have this plugin working great except for this
          WP.comWed, May 9, 12:38 PM
          yes this might not be possible on WordPress.com
          WP.comWed, May 9, 12:39 PM
          like I said
          WP.comWed, May 9, 12:39 PM
          we cannot give access to file uploading like that
          chrch01Wed, May 9, 12:39 PM
          can you escalate this please
          WP.comWed, May 9, 12:40 PM
          escalate?
          WP.comWed, May 9, 12:40 PM
          If you explain what you’d like to do in more detail, I can see if it’s possible.
          chrch01Wed, May 9, 12:42 PM
          on a page where we register customers using woo commerce and a form from Participants DB, we want to collect profile data on the new member. I have an old DB export in CSV and formatted according to Particpants specs and here we are.
          WP.comWed, May 9, 12:42 PM
          ok and?
          chrch01Wed, May 9, 12:43 PM
          So how do I load a csv file into this db
          WP.comWed, May 9, 12:43 PM
          you cannot as you need to upload a file in wp-content, which is not allowed on WordPress.com
          WP.comWed, May 9, 12:44 PM
          I suggest using mailchimp for email collection
          chrch01Wed, May 9, 12:45 PM
          this is really a membership database not just email.. but thanks and I will contact the applications vendor to see if they can help.
          WP.comWed, May 9, 12:46 PM
          if you want more features like memberships and such modifications are necessary, I suggest using WordPress.org

        3. Yes, well I’m sorry to hear that. WordPress.com is a closed platform with strict controls, so I guess it makes sense they don’t allow the uploads.

Leave a Reply
You have to agree to the comment policy.

6 thoughts on “Matching Multiple Fields with CSV Import or Signup Submission

  1. Hello,

    I love your plugin by the way but have hit a snag.. I want to upload a CSV file with club member data and wordpress.com will not allow this. How can I accomplish this upload.

    Chris Christian

    1. Hi Chris,

      I don’t know, I haven’t tried it on wordpress.com. Did you submit a support request to wordpress.com? It’s probably their configuration that’s stopping it.

      1. Hi,

        I talked to wp support through chat and they said I couldn’t upload a file into WordPress .com I will follow up again.

        1. Thanks, let me now if you learn anything new on this.

        2. Here is what I got from support… No other way to get support except through this chat.

          I have this plugin working great except for this
          WP.comWed, May 9, 12:38 PM
          yes this might not be possible on WordPress.com
          WP.comWed, May 9, 12:39 PM
          like I said
          WP.comWed, May 9, 12:39 PM
          we cannot give access to file uploading like that
          chrch01Wed, May 9, 12:39 PM
          can you escalate this please
          WP.comWed, May 9, 12:40 PM
          escalate?
          WP.comWed, May 9, 12:40 PM
          If you explain what you’d like to do in more detail, I can see if it’s possible.
          chrch01Wed, May 9, 12:42 PM
          on a page where we register customers using woo commerce and a form from Participants DB, we want to collect profile data on the new member. I have an old DB export in CSV and formatted according to Particpants specs and here we are.
          WP.comWed, May 9, 12:42 PM
          ok and?
          chrch01Wed, May 9, 12:43 PM
          So how do I load a csv file into this db
          WP.comWed, May 9, 12:43 PM
          you cannot as you need to upload a file in wp-content, which is not allowed on WordPress.com
          WP.comWed, May 9, 12:44 PM
          I suggest using mailchimp for email collection
          chrch01Wed, May 9, 12:45 PM
          this is really a membership database not just email.. but thanks and I will contact the applications vendor to see if they can help.
          WP.comWed, May 9, 12:46 PM
          if you want more features like memberships and such modifications are necessary, I suggest using WordPress.org

        3. Yes, well I’m sorry to hear that. WordPress.com is a closed platform with strict controls, so I guess it makes sense they don’t allow the uploads.

Leave a Reply
You have to agree to the comment policy.