WordPress.org

Ready to get started?Download WordPress

Forums

MailChimp List Subscribe Form
The input fields have no Value (11 posts)

  1. corkcork
    Member
    Posted 1 year ago #

    I'd like to add a value to the input fields (Name and Email), but I cannot find the code for these. Could someone please tell me where the code is? THank you.

    http://wordpress.org/extend/plugins/mailchimp/

  2. mc_nate
    Member
    Posted 1 year ago #

    Hey again!

    Much like changing the name of the input fields, you can also add a "predefined value" in MailChimp, which carries over into the WordPress plugin. Here's the information on that:

    How do I set default merge values (like Dear Customer)?: http://eepurl.com/hcDC

    Again, after these changes are made, you'll have to update your List by going to "Settings" -> "MailChimp Setup" -> "Update List".

    Let me know if you need anything else!

  3. b-summers
    Member
    Posted 1 year ago #

    I have followed these steps, and updated the mailchimp settings in my wordpress. Yet I still see NO text in the input boxes.

    http://www.foodforfamine.org/

    I don't want the label in front of the input box, I want the text INSIDE the input box. Could you direct me to where in the code this is? I had it done before, but when I updated the plugin it disappeared, and I've forgotten how I did it the first time.

  4. mc_tak
    Member
    Posted 1 year ago #

    Hey b-summers,

    Thanks for writing in to the forum. Using the steps in Nate's post above should ensure that your form fields are populated with visible values inside of the input boxes themselves, so we'll want to take a few steps to further test why that may not be happening.

    In taking a look at the form code on your site, I can see that the "value" parameter for each of your input boxes are not populated. When adding the default merge tag values like Nate's post describes, that should make it so that your form code populates 'values' for each of your input boxes. Unfortunately, that's not what's happening on this form.

    This generally indicates that:
    a) the default merge tags may not have been set properly in the MailChimp account
    b) the list hasn't been updated in the plugin's settings

    For a), make sure that you follow each step in the KB article listed in Nate's post. An easy way to double-check if your default merge tags are setup is to login to your MC account, go to the Lists tab > click the Gear icon > Forms. Then, click on your field name and check to see if the "default merge tag" value is populated.

    For b), update your settings by going to your WordPress Admin area, plugins > installed plugins > mailchimp > settings. Then click the update list button.

    If you've confirmed both of these steps were taken and are still seeing issues, feel free to post back here and I can take a closer look at your actual account to make sure everything is setup as intended.

    -tk

  5. b-summers
    Member
    Posted 1 year ago #

    hmmm It's not quite what I had before, but I guess it will work. It used to show up grey'd out, and when you clicked on the field the text disappeared.

    I don't see a default merge option for the email field. Is there a way to add this, or do I need to change the field to a "text" field rather than an "email" field?

  6. mc_tak
    Member
    Posted 1 year ago #

    Hey b-summers,

    I'm afraid that because the email field cannot be converted or have a default merge tag value set for it, that the email field cannot be populated with a default value in the same way as your other fields would.

    Based on your description of how it previously was, it sounds like you were using placeholders in input fields on your form. If you're interested in doing this gain, you have a few options to consider:

    First and foremost, here's more info on the HTML code you'd need to do that and how that works:
    http://www.w3schools.com/html5/att_input_placeholder.asp

    In order to implement it, you'll need to either add this to your plugin's form code, or alternatively use our embed code that we provide in your MailChimp account, and add the placeholder attributes in the embed code. If you're comfortable with PHP code, you can access the plugin code from inside of your WordPress admin area. Otherwise, you can use our embed code, which will provide you with the HTML code needed to add a sign up form to your website. From there, you'll just need to add the placeholder values onto each of your input fields to have that interaction. This includes setting a placeholder for your email field.

    Here's more information on how to get the embed code:
    How can I add my signup form to my website?: http://eepurl.com/gOGN

    If you have any questions, let me know!

  7. mc_tak
    Member
    Posted 1 year ago #

    Also, I found this!

    http://wordpress.org/support/topic/plugin-mailchimp-list-subscribe-form-request-add-placeholder-text-for-mailchimp-widget?replies=21

    So, that would work too. :) It sounds like this is what may have been referenced to get that to work previously, so definitely check out the suggestions in that thread.

    -tk

  8. b-summers
    Member
    Posted 1 year ago #

    Still not what I used last time (I think it was javascript)
    BUT it does work. haha.

    So thanks mc_tak. I'll have to star this in my email box, and remember to change it again when I have to update the plugin.

    :D

  9. mc_tak
    Member
    Posted 1 year ago #

    Hey hey,

    Ah, glad to hear that it worked! Yep yep, since it's a customization to the code, you'll want to remember to re-add it after each plugin update. If you have any questions in the mean time, let us know!

    -tk

  10. bjknapp
    Member
    Posted 1 year ago #

    Hey guys, I'm having the same issue, but I'm almost there. I've tried both of these ideas:

    "placeholder="Your best email....""

    "Instead, use placeholder="'.esc_html($var['name']).'" and your MailChimp Field Label will be displayed."

    And it works in Chrome and Firefox, but not in IE. Any suggestions?

    Also, I would love for the placeholder text to disappear once you click on it. Any ideas for that? :)

    Thanks in advance!
    -brian

  11. mc_tak
    Member
    Posted 1 year ago #

    Hey dude,

    Thanks for writing in! I'm afraid that the placeholder attribute is not supported by Internet Explorer. The non-support of this is verified on w3schools' website, here: http://www.w3schools.com/tags/att_input_placeholder.asp (specifically in the browser support area for this attribute).

    If consistency is a concern, we'd recommend using the built-in functionality, which is to set default merge tag values in your MailChimp account for each of your fields. This will populate values in your form's fields by default, but will NOT disappear on click. So neither of these options will be able to suit the needs to have both IE support and disappearing on-click.

    For a solution that is both supported in IE and disappears on-click, you'll ultimately need to look into outside options that would interact with the plugin's form code. As an example, you may look into some of the jquery options out there that deal specifically with adding placeholder attribute support in Internet Explorer. If you're able to get that plugin to play nicely with the MailChimp form, you should then see both of your desired conditions satisfied.

    If you have any questions, feel free to post here and let us know!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.