Skip to content

Commit

Permalink
Fix issues with Mailchimp newsletter signup (#1469)
Browse files Browse the repository at this point in the history
* Updating Mailchimp embed code

* Updating field names for newsletter form

* Update newsletter signup from main page
  • Loading branch information
pt2302 authored Nov 20, 2024
1 parent 95b74c7 commit d4ab5e3
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion fields/layouts/partials/extrahead.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{{ $css_urls := slice (partial "get_asset_webpack_url.html" "www.css") (partial "get_asset_webpack_url.html" "fields.css") }}
{{ partial "include_css.html" (dict "context" . "urls" $css_urls) }}
<link
href="//cdn-images.mailchimp.com/embedcode/classic-10_7.css"
href="//cdn-images.mailchimp.com/embedcode/classic-061523.css"
rel="stylesheet"
type="text/css"
/>
Expand Down
14 changes: 7 additions & 7 deletions www/layouts/newsletter/section.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ <h1>Subscribe to our newsletter</h1>
<!-- Begin Mailchimp Signup Form -->
<div id="mc_embed_signup" class="px-lg-5 px-3 pt-1">
<form
action="https://mit.us6.list-manage.com/subscribe/post?u=ad81d725159c1f322a0c54837&amp;id=4c04dfddc5"
action="https://mit.us6.list-manage.com/subscribe/post?u=ad81d725159c1f322a0c54837&amp;id=4c04dfddc5&amp;f_id=00e734e1f0"
method="post"
id="mc-embedded-subscribe-form"
name="mc-embedded-subscribe-form"
Expand Down Expand Up @@ -60,10 +60,10 @@ <h2>Be informed</h2>
<input type="text" value="" name="LNAME" class="" id="mce-LNAME" />
</div>
<div class="mc-field-group">
<label for="mce-MMERGE5"
<label for="mce-EDROLE"
>Educational Role <span class="asterisk">*</span>
</label>
<select name="MMERGE5" class="required" id="mce-MMERGE5">
<select name="EDROLE" class="required" id="mce-EDROLE">
<option value=""></option>
<option value="Independent learner">Independent learner</option>
<option value="MIT Alumnus/Alumna">MIT Alumnus/Alumna</option>
Expand All @@ -87,10 +87,10 @@ <h2>Be informed</h2>
</select>
</div>
<div class="mc-field-group">
<label for="mce-MMERGE4"
<label for="mce-COUNTRY"
>Country <span class="asterisk">*</span>
</label>
<select name="MMERGE4" class="required" id="mce-MMERGE4">
<select name="COUNTRY" class="required" id="mce-COUNTRY">
<option value=""></option>
<option value="United States of America"
>United States of America</option
Expand Down Expand Up @@ -438,9 +438,9 @@ <h2>Be informed</h2>
ftypes[1] = "text"
fnames[2] = "LNAME"
ftypes[2] = "text"
fnames[3] = "MMERGE5"
fnames[3] = "EDROLE"
ftypes[3] = "dropdown"
fnames[4] = "MMERGE4"
fnames[4] = "COUNTRY"
ftypes[4] = "dropdown"
})(jQuery)
var $mcj = jQuery.noConflict(true)
Expand Down
2 changes: 1 addition & 1 deletion www/layouts/partials/extrahead.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{{ $css_urls := slice (partial "get_asset_webpack_url.html" "www.css" ) (partial "get_asset_webpack_url.html" "common.css" ) }}
{{ partial "include_css.html" (dict "context" . "urls" $css_urls ) }}
<link
href="//cdn-images.mailchimp.com/embedcode/classic-10_7.css"
href="//cdn-images.mailchimp.com/embedcode/classic-061523.css"
rel="stylesheet"
type="text/css"
/>
Expand Down
2 changes: 1 addition & 1 deletion www/layouts/partials/newsletter_signup.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<form action="" method="get" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" class="newsletter-form d-flex" target="_blank" novalidate>
<form action="/newsletter/" method="get" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" class="newsletter-form d-flex" target="_blank" novalidate>
<div class="icon-text-box-wrapper d-flex flex-row flex-grow-1 form-group bg-white shadow-sm border-gray p-0 m-0">
<img class="input-group-prepend px-2" src="/images/envelope.svg" alt="" />
<input aria-label="Subscribe to the OCW Newsletter" type="email" value="" name="EMAIL" class="email form-control border-0" id="mce-EMAIL" placeholder="Your email address...">
Expand Down

0 comments on commit d4ab5e3

Please sign in to comment.