Determining what is RAW html

I tried generating an email opt-in form for Mailchimp in a Wordpress theme called Thrive themes. When I pasted in the mailchimp code, it did not display right because, the forum said, > When generating the code from mailchimp it has to be raw HTML, stripped by any script.

I thought it was already so. What am I missing?

<!-- Begin MailChimp Signup Form -->
<link href="//cdn-images.mailchimp.com/embedcode/classic-10_7.css" rel="stylesheet" type="text/css">
<style type="text/css">
	#mc_embed_signup{background:#fff; clear:left; font:14px Helvetica,Arial,sans-serif; }
	/* Add your own MailChimp form style overrides in your site stylesheet or in this style block.
	   We recommend moving this block and the preceding CSS link to the HEAD of your HTML file. */
</style>
<div id="mc_embed_signup">
<form action="//amazing80.us1.list-manage.com/subscribe/post?u=d2ead708893f3254e69f7d4e4&amp;id=9f16924085" method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" class="validate" target="_blank" novalidate>
    <div id="mc_embed_signup_scroll">
	<h2>Subscribe to our mailing list</h2>
<div class="indicates-required"><span class="asterisk">*</span> indicates required</div>
<div class="mc-field-group">
	<label for="mce-EMAIL">Email Address  <span class="asterisk">*</span>
</label>
	<input type="email" value="" name="EMAIL" class="required email" id="mce-EMAIL">
</div>
<div class="mc-field-group">
	<label for="mce-FNAME">First Name </label>
	<input type="text" value="" name="FNAME" class="" id="mce-FNAME">
</div>
	<div id="mce-responses" class="clear">
		<div class="response" id="mce-error-response" style="display:none"></div>
		<div class="response" id="mce-success-response" style="display:none"></div>
	</div>    <!-- real people should not fill this in and expect good things - do not remove this or risk form bot signups-->
    <div style="position: absolute; left: -5000px;" aria-hidden="true"><input type="text" name="b_d2ead708893f3254e69f7d4e4_9f16924085" tabindex="-1" value=""></div>
    <div class="clear"><input type="submit" value="Subscribe" name="subscribe" id="mc-embedded-subscribe" class="button"></div>
    </div>
</form>
</div>

<!--End mc_embed_signup-->

Hi,

I would think raw html means just the html tags and content. That would exclude the style attribute you have there.

I didn’t get where you actually pasted the code, but have you also tried without the style attribute in the div tag? If the purpose is to hide the input field, can you perhaps use a hidden input instead?

What is in the top of your page?.. the <head> section?, !doctype?, etc. Does the tag actually link to a stylesheet? that shouldn’t be within the body of the page and possibly not in the mail-file at all. That’s why inline styles are used instead of a stylesheet… and some inline styles have to be written individually, not as shortcuts.

It’s my understanding that MailChimp gives good help info, but I haven’t personally used MailChimp.

Mailchimp have what they call a “naked” form which provides you with the minimal form elements, typically you’d get form form html tags but no CSS or JS.

Try that version!

I tried using Mailchimp’s “naked” version to no avail.

<form action="//amazing80.us1.list-manage.com/subscribe/post?u=d2ead708893f3254e69f7d4e4&amp;id=9f16924085" method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" class="validate" target="_blank" novalidate>
	<input type="email" value="" name="EMAIL" class="required email" id="mce-EMAIL">
	<input type="text" value="" name="FNAME" class="" id="mce-FNAME">
        <input type="text" name="b_d2ead708893f3254e69f7d4e4_9f16924085" tabindex="-1" value="">
        <input type="submit" value="Subscribe" name="subscribe" id="mc-embedded-subscribe" class="button">
</form>

I’m not clear what you are trying to achieve. Are you trying to include a form in your email?

Email clients generally use a very old version of HTML and mostly do everything the way it shouldn’t be done in a web page. Generally they don’t like external or internal CSS, but require all CSS to be inline.

I’m trying to create a sign-up form on a squeeze page in a Thrive Themes plugin for Wordpress.

If you are pasting that code into a WordPress entry form, the system is likely to mess it up with its own code. You need to be able to insert it into an actual HTML file, perhaps by opening up the template files etc.

I don’t know about Wordpress but most content systems allow you to create code “snippets” which you can use to store chunks of code and pull into any template.

If @ralphm is right in thinking you may be pasting the code into a WYSIWYG field then that could strip out some HTML, far better to use a plain textarea field.

1 Like

When a debugger or validation is not available, my approach is to create a “Hello world” snippet the to gradually add the problem code until it breaks.

Once broken, copy and paste the error messages and/or script and Google for a solution.

It turns out that the problem was a conflict between the plugin I was using and another Wordpress plugin. After disabling the other plugin, the code worked. Thanks for all your suggestions.

3 Likes

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.