Title: adding to a database
Last modified: August 21, 2016

---

# adding to a database

 *  Resolved [genkitam](https://wordpress.org/support/users/genkitam/)
 * (@genkitam)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/adding-to-a-database/)
 * Hi, I have added a form to WordPress using the Mailchimp plugin. I have fields
   of: First name, Last name, phone number and email.
    When I test this form and
   subscribe, only my first name and email are added to the Mailchimp database. 
   It is not adding last name or phone number which are really important. Can you
   tell me what I might be doing wrong? I will copy my form code below. Many thanks!
   Tam
 * <p>
    <label for=”mc4wp_f%N%_fname”>First name:</label><input type=”text” name
   =”fname” value=”” placeholder=”Your first name” required/> </p> <p> <label for
   =”mc4wp_f%N%_lname”>Last name:</label><input type=”text” name=”lname” value=””
   placeholder=”Your last name” required/> </p> <p> <label for=”mc4wp_f%N%_pnumber”
   >Phone number: </label><input type=”text” name=”pnumber” value=”” placeholder
   =”Your phone number” /> </p> <p> <label for=”mc4wp_f%N%_email”>Email address:
   </label> <input type=”email” id=”mc4wp_f%N%_email” name=”email” required placeholder
   =”Your email address” /> </p> <p> <input type=”submit” value=”Sign up” /> </p
   >
 * [http://wordpress.org/plugins/mailchimp-for-wp/](http://wordpress.org/plugins/mailchimp-for-wp/)

Viewing 9 replies - 1 through 9 (of 9 total)

 *  Plugin Author [Danny van Kooten](https://wordpress.org/support/users/dvankooten/)
 * (@dvankooten)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/adding-to-a-database/#post-4047096)
 * Hi,
 * Are you sure that MailChimp uses `PNUMBER` and `LNAME` as the name of your list
   fields? That’s what my plugin is sending to MailChimp right now, but if MailChimp
   doesn’t recognize the field names it will just ignore the data.
 * Then, are you using the shortcode `[mc4wp-form]` to render the form?
 * Thanks.
 * Danny
 *  [chrissmit](https://wordpress.org/support/users/chrissmit/)
 * (@chrissmit)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/adding-to-a-database/#post-4047272)
 * Hi Danny,
 * I seem to have a comparable problem.
    I’ve added 3 fields in my Mailchimp db.
 * But, when registering using my WP site the 3 fields I created do not populate.
 * What am I missing?
 * I’m sure I’m using the right correct short code on my page as the form I’ve created
   does show up correctly on my site.
    I’ve also double checked if I’m using the
   correct tag codes.
 * Below is the code I’ve generated:
 * ***
 * <p>
    <input type=”text” name=”fname” value=”” placeholder=”Voornaam” required/
   > </p>
 * <p>
    <input type=”text” name=”lname” value=”” placeholder=”Naam” required/> </
   p>
 * <p>
    <input type=”email” name=”email” value=”” placeholder=”Email” required/>
   </p>
 * <p>
    <label for=”mc4wp_f%N%_mmerge4″>Ik ben een Opdrachtgever</label> <input 
   type=”checkbox” name=”mmerge4″ id=”mc4wp_f%N%_mmerge4″ /> </p>
 * <p>
    <label for=”mc4wp_f%N%_mmerge3″>Ik ben een Freelancer</label> <input type
   =”checkbox” name=”mmerge3″ id=”mc4wp_f%N%_mmerge3″ /> </p>
 * <p>
    <label for=”mc4wp_f%N%_mmerge5″>Ik ben een Supporter</label> <input type
   =”checkbox” name=”mmerge5″ id=”mc4wp_f%N%_mmerge5″ /> </p> <p> <input type=”submit”
   value=”Verstuur” /> </p>
 *  Plugin Author [Danny van Kooten](https://wordpress.org/support/users/dvankooten/)
 * (@dvankooten)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/adding-to-a-database/#post-4047287)
 * Hi Chris,
 * Make sure to add `value` attributes to your input elements.
 * Example:
 *     ```
       <p>
       <label for="mc4wp_f%N%_mmerge4">Ik ben een Opdrachtgever</label>
       <input type="checkbox" name="NMERGE4" value="Ja" id="mc4wp_f%N%_mmerge4" />
       </p>
       ```
   
 * Also, I’ve made it a best practice to use uppercased name attribute values for
   your input fields al though this is not required right now. The plugin takes 
   care of this for you.
 * Hope that helps, good luck!
 * Danny
 *  [chrissmit](https://wordpress.org/support/users/chrissmit/)
 * (@chrissmit)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/adding-to-a-database/#post-4047350)
 * Hi Danny,
 * Thanks for your answer. Finally got the time to test your solution, but to no
   avail.
 * Below is my form file:
 * Any other suggestions?
 * thx
    Chris
 * <p>
    <input type=”text” name=”fname” value=”” placeholder=”Voornaam” required/
   > </p>
 * <p>
    <input type=”text” name=”lname” value=”” placeholder=”Naam” required/> </
   p>
 * <p>
    <input type=”email” name=”email” value=”” placeholder=”Email” required/>
   </p>
 * <p>
    <label for=”mc4wp_f%N%_mmerge4″>Ik ben een Opdrachtgever</label> <input 
   type=”checkbox” name=”MMERGE4″ value=”Ja” id=”mc4wp_f%N%_mmerge4″ /> </p>
 * <p>
    <label for=”mc4wp_f%N%_mmerge3″>Ik ben een Freelancer</label> <input type
   =”checkbox” name=”MMERGE3″ value=”Ja” id=”mc4wp_f%N%_mmerge3″ /> </p>
 * <p>
    <label for=”mc4wp_f%N%_mmerge5″>Ik ben een Supporter</label> <input type
   =”checkbox” name=”MMERGE5″ value=”Ja” id=”mc4wp_f%N%_mmerge5″ /> </p> <p> <input
   type=”submit” value=”Verstuur” /> </p>
 *  Plugin Author [Danny van Kooten](https://wordpress.org/support/users/dvankooten/)
 * (@dvankooten)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/adding-to-a-database/#post-4047351)
 * Hi Chris,
 * It depends a lot on your list setup but are you sure MMERGE3, MMERGE4 and MMERGE5
   are the right names? If you want you can create a temporary WP account for me
   at `hi@dannyvankoo...com` so I can take a quick look and set up the correct form
   for you.
 * Another option is to upgrade to Pro and add the fields from the field wizard 
   located at the right side of the screen, containing all your MailChimp list fields.
 * Hope that helps!
 * Danny
 *  [chrissmit](https://wordpress.org/support/users/chrissmit/)
 * (@chrissmit)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/adding-to-a-database/#post-4047354)
 * Hi Danny,
 * Thanks for reaching out. Just created an account for you.
 * Nogmaals dank!
 * gr
    Chris
 *  Plugin Author [Danny van Kooten](https://wordpress.org/support/users/dvankooten/)
 * (@dvankooten)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/adding-to-a-database/#post-4047355)
 * Hi Chris,
 * Geen dank, just fixed it for you!
 * Would really appreciate it if you could take a quick minute to leave a review
   on my plugin.
 * Succes!
 *  [chrissmit](https://wordpress.org/support/users/chrissmit/)
 * (@chrissmit)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/adding-to-a-database/#post-4047356)
 * Review is done!
 * Thanks for your really fast reply.
 * Can you explain what you did and what I missed?
 * thx
    C
 *  Plugin Author [Danny van Kooten](https://wordpress.org/support/users/dvankooten/)
 * (@dvankooten)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/adding-to-a-database/#post-4047357)
 * Hi Chris,
 * Thanks, really appreciate it!
 * I’m lazy so I used the Pro version of the plugin to create the HTML for the form
   fields and then copied it to your form mark-up. But, the value of the input fields
   should match the value of the MailChimp field (because it is a radio field).
 * _Your HTML_
    `<input type="checkbox" name="MMERGE3" value="Ja" />`
 * _HTML generated by MailChimp for WP Pro_
    `<input type="checkbox" name="MMERGE3"
   value="Freelancer" />`
 * Hope that helps!
 * Good luck on your website.

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘adding to a database’ is closed to new replies.

 * ![](https://ps.w.org/mailchimp-for-wp/assets/icon-256x256.png?rev=1224577)
 * [MC4WP: Mailchimp for WordPress](https://wordpress.org/plugins/mailchimp-for-wp/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/mailchimp-for-wp/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/mailchimp-for-wp/)
 * [Active Topics](https://wordpress.org/support/plugin/mailchimp-for-wp/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/mailchimp-for-wp/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/mailchimp-for-wp/reviews/)

 * 9 replies
 * 3 participants
 * Last reply from: [Danny van Kooten](https://wordpress.org/support/users/dvankooten/)
 * Last activity: [12 years, 7 months ago](https://wordpress.org/support/topic/adding-to-a-database/#post-4047357)
 * Status: resolved