Hey Ronny,
Thanks for writing in to the forum. A few questions here, so I’ll answer in order:
First question:
Yep yep, this is possible, though you’ll need to make a slight change to the plugin code. If you’re comfortable with editing code, here are the steps:
-In wp-admin, go to Plugins > Editor > MailChimp > mailchimp_widget.php.
-Locate this line of code:
<input type="text" size="18" placeholder="'.esc_html($var['default']).'" name="'.esc_attr($opt).'" id="'.esc_attr($opt).'" class="mc_input"/>';
-Change $var[‘default’] to $var[‘name’]. This will begin using your field label as what appears in the placeholder attribute for your input fields.
-To hide the field labels, you can add this CSS code to your stylesheet:
#mc_signup_form .mc_var_label {
display: none;
}
If you’re not comfortable with code, you can set your default merge tag values in your MailChimp account, which will then show as placeholder values in your plugin’s signup form. However, since default merge tag values can’t be set for the email field, that will remain blank. The above code-changing solution will fill in the email field as well.
Second question:
I’m afraid that this is not currently a feature of the plugin, though I’ll be sure to pass along your feedback as a feature request.
Third question:
This isn’t an issue that I’ve encountered myself. Would you be able to provide me with a link to your site with the active form so that I can take a closer look?
-tk
mc_talk — thanks so much!! Did the trick and it’s super easy to do.
I can’t find the lines of code to add the placeholder. Has it by any chance been changed with an update?
Hey lucawater,
Thanks for getting in touch here. mc_tak’s instructions should still work. If you search mailchimp_widget.php
for placeholder
, there should be three lines with that which are all pretty similar to the line he mentioned (for regular merge tags plus a couple of specific field types). You should be able to make the change mentioned there, as well as adding the specified CSS code to your theme’s style.css file in order to make sure the normal placeholder text is hidden.
That should have you good to go!
-Gabe
Thanks for the reaction, I found it!
There’s still a problem though: it says that mailchimp_widget is “inactive”, while mailchimp.php is active. How do I activate the widget?
Also, I can’t update the file anywhere after I edit it. So when I refresh the page it’s back to default. Could you give me a solution there?
Thanks!
Hi Luca,
Thanks for writing back. It seems by default the mailchimp_widget.php file will display as inactive in the plugins editor. That file displaying as inactive shouldn’t affect the ability to save changes to it and the file should still work on your site.
Just to clarify what’s happening here, after you change ‘esc_html($var[‘default‘])’ to ‘esc_html($var[‘name‘])’ and save the change it isn’t being saved in the editor? Or is the change not being reflected in your site? Also have you tried saving the changes from another browser? Try this just in case there’s a browser issue.
We look forward to hearing from you!
-mc_d
Ok, i’ve tried it in chrome and safari now. There isn’t any save/submit button i’m missing right? Anyway, it’s not saving the changes…
I see the problem now: “You need to make this file writable before you can save your changes. See the Codex for more information”.
Hey! Were you able to get things worked out once getting the file set to writable?
Please feel free to let us know if you’re still running into trouble!
-Gabe
Yes it’s working perfectly fine now, thanks for your help!