Newsletter Sign-Up
In widget, NAME required field box doesn't work w/placeholder text (2 posts)

  1. girathryn
    Posted 3 years ago #

    Hello! I just noticed a small bug with your otherwise awesome plugin:

    I have "name" set as a required field in the widget with the placeholder text as "your name." However, if someone does NOT replace the placeholder text with their name, then the placeholder text gets submitted to mailchimp as their name.

    Any way to fix this? I do not have that issue with the email address. If you don't change that placeholder text to a correct email address, a cute little error message pops up.

    Any help would be appreciated. You can see your plugin in action at:


    Thank you!


  2. Souljah67
    Posted 3 years ago #

    I am not using the widget but I had the same problem with the normal version of the sign up and this is how I fixed it adding the placeholder text as the First name on MailChimp. By no means am I saying this is the proper way to do it, it's just the way I figured out to fix it.

    In the frontend/NewsletterSignUp.php file on line 261 I changed this code:
    if(isset($this->options['mailinglist']['subscribe_with_name']) && $this->options['mailinglist']['subscribe_with_name'] == 1 && isset($opts['name_required']) && $opts['name_required'] == 1 && empty($name)) {

    to this:
    if(isset($this->options['mailinglist']['subscribe_with_name']) && $this->options['mailinglist']['subscribe_with_name'] == 1 && isset($opts['name_required']) && $opts['name_required'] == 1 && ($name== "First Name")) {

    I added && ($name== "First Name") to the end of the statement and my placeholder text was First Name so just change that to your name and try it out. Save a copy of your original file just in case.

    Let me know if it worked for you.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Newsletter Sign-Up
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic