Skip to content

Instantly share code, notes, and snippets.

@naveenvm93
Last active July 10, 2021 14:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save naveenvm93/99d834f869473b06a6809c5d9706ba44 to your computer and use it in GitHub Desktop.
Save naveenvm93/99d834f869473b06a6809c5d9706ba44 to your computer and use it in GitHub Desktop.
<!-- {{={< >}=}} -->
<!DOCTYPE html>
<html amp4email data-css-strict>
<head>
<meta charset="utf-8">
<script async src="https://cdn.ampproject.org/v0.js"></script>
<script async custom-element="amp-form" src="https://cdn.ampproject.org/v0/amp-form-0.1.js"></script>
<script async custom-element="amp-list" src="https://cdn.ampproject.org/v0/amp-list-0.1.js"></script>
<script async custom-template="amp-mustache" src="https://cdn.ampproject.org/v0/amp-mustache-0.2.js"></script>
<style amp4email-boilerplate>body{visibility:hidden}</style>
<style amp-custom></style>
<style amp-custom>
.header {
padding: 3em 1.25em;
text-align:center;
}
.header amp-img {
margin:0 auto;
max-width: 220px;
}
h2 {
margin: .5em 0;
font-size: 2.5em;
text-align: center;
}
.coupon-product-button {
display: inline-block;
text-decoration: none;
color: #fff;
background-color: #097fb3;
text-align: center;
border-radius: 2em;
padding: 1em 2em;
}
.sample-form{
text-align: center;
}
</style>
</head>
<body>
<!-- %%view_email_url%% -->
<!-- %%unsub_center_url%% -->
<div class="header">
<amp-img layout="responsive" src="https://image.s10.sfmc-content.com/lib/fe4015707564067d701477/m/1/32e65d5a-13f0-4050-a9b6-1bd4442699fc.png" width="348" height="242" alt="SalesforceFan"></amp-img>
</div>
<form class="sample-form" method="post" action-xhr="SFMCCloudPageURL">
<input type="hidden" name="email" value="%%EmailAddress%%">
<input type="submit" class="coupon-product-button" value="Claim Coupon">
<div submit-success>
<template type="amp-mustache">
Here is your coupon - {{couponId}}
</template>
</div>
<div submit-error>
<template type="amp-mustache">
Error! Please try again later.
</template>
</div>
</form>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment