Skip to content

Instantly share code, notes, and snippets.

@brianlarson
Last active December 16, 2020 19:20
Show Gist options
  • Save brianlarson/959d8de1a5b4cf5fad998a79787cb27c to your computer and use it in GitHub Desktop.
Save brianlarson/959d8de1a5b4cf5fad998a79787cb27c to your computer and use it in GitHub Desktop.
Freeform (Craft CMS) Admin Email Notification
<style type="text/css">
body {
font: normal 12px sans-serif;
}
thead {
border-top: 1px solid #353535;
border-right: 1px solid #353535;
border-left: 1px solid #353535;
text-transform: uppercase;
letter-spacing: 1px;
}
table {
border-collapse: collapse;
width: 100%;
border: 2px solid #eee;
}
th {
color: #fff;
background-color: #4a4a4a;
}
th, td {
padding: 0.75rem;
text-align: left;
border: 2px solid #fff;
}
tbody tr:nth-child(odd) {
background: #f0f0f0;
}
</style>
<p><em>Submitted on: {{ dateCreated|date('l, F j, Y \\a\\t g:ia') }}</em></p>
<table>
<tbody>
{% for field in allFields %}
<tr>
<td>{{ field.label }}</td>
<td>{{ field.valueAsString }}</td>
</tr>
{% endfor %}
</tbody>
</table>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment