Giter Club home page Giter Club logo

email-base-layout-freeform's Introduction

Email Base Layout [Free Form] ✨

N|Solid

Re-usable email template fully tested in:

  • Apple Mail (Light/Dark)
  • Outlook Office 365 (Light/Dark)
  • Outlook 2016
  • Outlook 2019
  • Gmail App Android (Light/Dark)
  • Gmail App iOs (Light/Dark)
  • iPad (Retina)
  • iPhone 11/12/12 mini/SE
  • AOL Mail (Edge)
  • Gmail (Chrome)
  • Outlook (Chrome) (Light/Dark)
  • Yahoo! Mail (Firefox)

How to use in your awesome Craft CMS project:

Templates:

You will find the email layout and the example FreeForm template within templates directory.

  • Place the email-templates directory inside your templates directory. NOTE: Is not mandatory to place it in the root of templates directory. You can place it inside a subdirectory as well, it is up to you. Just remember, if you place this in a different location, you will need to replace the extends path in the _email-layout.html template: {% extends "_email-layout.html" %}
  • Place the _email-layout.html file inside your templates directory. It is recommended that email-templates directory and _email-layout.html file to be at the same level, if this template is not sibling of email-templates directory, you will need to replace the extends path (line 7) with the correct one.
  • Go to /admin/freeform/settings/email-templates to set up the templates path.
  • Type email-templates as the template directory path. If you placed the email-templates directory in a different location you will need to fill the field with the correct location according to your templates structure.
  • Click Save.
  • The example Contact Us template will be shown below.

alt text

  • Go to your FreeForm in /admin/freeform/forms to configure your form notification template.
  • Click on your form name.
  • At the top/right corner, click in the Admin Notification (alt text icon) and select the example Contact Us template.

alt text

πŸ”Ž Don't forget to set up the admin recipients email addresses in the textarea below. πŸ“Œ It is recommended to use internal testing email addresses in development/local environments (your personal/blackmagic emails would be fine πŸ“¨). NOTE: ON PRODUCTION ENVIRONMENT THESE EMAIL ADDRESSES WILL BE REPLACED WITH THE ONES OF THE CLIENT:

alt text

Template customization:

The email layout is ready to be customized through the CMS, THIS IS NOT MANDATORY but it would be more magical if you use it like this 🦯🎩✨

Fields

The template can have these custom elements:

  • Logo
  • Header background
  • Body background
  • Footer background

So we will need to create a field for each of them. So, go to /admin/settings/fields and create a new group of fields, I recommend to name it "Email layout" but you can use the name you prefer. Inside that group we will create these fields:

Field Name Handle Type
Logo logo asset
Header Background Color headerBgColor color
Body Background Color bodyBgColor color
Footer Background Color footerBgColor color

NOTE: In the Logo field description be sure to request an image in PNG/JPG format.

alt text

Globals

  • Go to /admin/settings/globals, click on New global set and create a global called Email Layout, be sure the handle is emailLayout.
  • Drag and drop all the fields you created previously to the global.
  • Click Save.

alt text

  • Go to /admin/globals/default/emailLayout to customize your email basic elements.

alt text

Form submission

Whenever your FreeForm is submitted, the customized template will be sent: alt text

NOTE: If you test your form in your local environment, you will see a broken logo. DonΒ΄t worry, it will work fine when you deploy to a higher environment πŸš€


MAKING THE INTERNET A HAPPIER PLACE πŸ’«

email-base-layout-freeform's People

Contributors

dianyelamaldonado avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.