Hey all,
@larsgj, the placeholder code that you referenced in your original reply should still work if you add that back into your plugin’s code. That is, this code you referenced:
placeholder="'.esc_html($var['name']).'"
Since you’re running into the limitation of not being able to set a default merge value for the EMAIL field, I’d recommend re-using this code that you had in place before.
To do this, go to your mailchimp_widget.php file, then locate this block of code:
case 'text':
case 'number':
default:
$html .= '
<input type="text" size="18" placeholder="'.esc_html($var['default']).'" name="'.esc_attr($opt).'" id="'.esc_attr($opt).'" class="mc_input"/>';
Locate the placeholder portion of this code and change it from ‘default’ to ‘name’. So it should look like this:
case 'text':
case 'number':
default:
$html .= '
<input type="text" size="18" placeholder="'.esc_html($var['name']).'" name="'.esc_attr($opt).'" id="'.esc_attr($opt).'" class="mc_input"/>';
Keep in mind that this will remove the default merge value feature that nate mentioned above. Instead, your field’s placeholder text will read whatever your field labels are named.
You should end up with something like this https://screencast.com/t/2WmJt6YJ and you can choose to hide the field labels if you wish.
Let me know if you have any questions!