EvanHerman / yikes-inc-easy-mailchimp-extender

Easy Forms for MailChimp WordPress Plugin
http://yikesplugins.com
GNU General Public License v2.0
25 stars 28 forks source link

Why does the form that I customize in Mailchimp not appear? #162

Closed TantumErgo closed 9 years ago

TantumErgo commented 9 years ago

I created a form in the Mailchimp server that I'd like to use on my site (mainly because it has an image on it), but when I update the plugin information, it only seems to update the fields on the form that require user input (i.e. name and email). How can I use the form I created? Or is there a way to add my image within the plugin itself? The functionality of the form is excellent and works exactly as I set up, but the display of the form doesn't match what I created.

Additionally, how do I control where my opt-in form appears on my site? Right now, I have it visible via a widget in the sidebar, but would I also be able to add a sign up bar in the header, a form in or at the end of a post, etc?

Thanks in advance for the help

EvanHerman commented 9 years ago

Hi DoublieLive78,

At the moment It's not possible to import the forms you create on MailChimps side. You can import the lists and then generate the forms through our plugin. You can however add your image to the form through the use of our provided hooks to add your image before or after the form. You can also import one of our boilerplate template files, and use that to create a more custom form through the use of HTML and CSS.

To answer your second question, you can generate the form anywhere on your site using the provided shortcode. On the manage list forms page you can grab the shortcode, or when on the post or edit page you can click our little yikes icon, in the toolbar of the content editor, and select a form. The shortcode will look similar to : [yks-mailchimp-list id="adf8441235" submit_text="Submit"], where the ID would be different for your form.

Thanks, Evan

TantumErgo commented 9 years ago

Evan,

First, thanks for the quick reply!

I did see the boilerplate template file option, but I didn't really understand how to use it. I also remember reading about hooks somewhere, but I also don't understand what they are. Would you mind explaining them real quick?

As for the shortcode, I thought that was what I needed to do, but when I pasted the shortcode into a post, the website only displayed the shortcode, and not the form. Maybe I pasted the shortcode into the wrong editor. I didn't even see the yikes icon in the toolbar until your response had me go look for it, so thanks for that!

Nik

TantumErgo commented 9 years ago

Quick update on the shortcode: I used the button in the toolbar, and it was inserted into the post correctly, thanks! However, the shortcode only inserts the form fields and the button. So when using the shortcode, I'd have to manually enter both the image and the headline of the form?

EvanHerman commented 9 years ago

Hi DoubleLive78,

That's correct. You can either use the yks_mc_before_form_$formID hook to add text or images bfore you form.

Example:

/**
* Function to add text before the form with ID '0b071c0bd1'
* You can get form ID's from the 'MailChimp List' page
*/
function custom_before_form_action() {
    echo '<img src="path/to/your/image/">';
}
add_action( 'yks_mc_before_form_#formID' , 'custom_before_form_action' );

Or you can copy over our boilerplate file and edit the template to add the image with an img tag where needed.

Thanks, Evan

TantumErgo commented 9 years ago

I see, thanks!

One more question: where do I use that code for the hook? Where would I paste and edit the code of the form?

EvanHerman commented 9 years ago

You would need to paste that code into your active themes function.php file.

Thanks, Evan

TantumErgo commented 9 years ago

I created the form I want, thanks for the help!