PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Create DB Record in Third Party Plugin Table from New User Registration Form

  1. I’m looking for a method to automatically create a new record in the Store Locator plugin (http://www.charlestonsw.com/) when a new user signs up via a Gravity Forms user registration form on the site (http://www.mnla.com). Using the Gravity Forms action hook and function below, I should (I think) be able to produce insertion of a new Store Locator item. This code snippet is included in my functions.php file. What I am getting in Store Locator is a new record, but with none of the data entered.

    Do you see anything in here that looks incorrect? Is there another way I might go about doing this?

    // Add data to Store Locator
    add_action("gform_after_submission_1", "input_fields", 10, 2);
    function input_fields($entry, $form){
        global $wpdb;
    	$store = $entry["5"];
    	$address = $entry["17.1"];
    	$address2 = $entry["17.2"];
    	$city = $entry["17.3"];
    	$state = $entry["17.4"];
    	$zip = $entry["17.5"];
    	$email = $entry["16.1"];
    	$url = $entry["8"];
    	$phone = $entry["6"];
       $SQL = "INSERT INTO wp_store_locator ( sl_id, sl_store, sl_address, sl_address2, sl_city, sl_state, sl_zip, sl_email, sl_url, sl_phone ) VALUES ( '', '$store' , '$address', '$address2', '$city', '$state', '$zip', '$email', '$url', '$phone' )";
       $wpdb->query($SQL);
    }

    Thanks.

    Posted 6 years ago on Tuesday May 14, 2013 | Permalink
  2. Not trying to be pushy here....but, anything?

    Posted 6 years ago on Friday May 17, 2013 | Permalink
  3. handling via priority support.

    Posted 6 years ago on Monday May 20, 2013 | Permalink

This topic has been resolved and has been closed to new replies.