CYPIAPT-LNDSE / welcome-to-camhs

Fun and accessible questionnaire for children when first visiting CAMHS.
https://welcome-in.herokuapp.com/
MIT License
5 stars 3 forks source link

Send data from sessionStorage via email. Related #70. #134

Closed RhodesPeter closed 7 years ago

RhodesPeter commented 7 years ago

This is what the completed email looks like this: screen shot 2017-03-31 at 23 06 42

RhodesPeter commented 7 years ago

Hi @des-des - I have pushed up a new version. The email is being sent with the right information and it now comes through handlebars rather than in the backend as you requested, however we can't give our email.hbs access to our main.css file. Please could you point me in the right direction? Thank you :)

des-des commented 7 years ago

@RhodesPeter you can inline the css (just as you were doing in your original version), also, your hbs is crying out for a loop

something like

{{#each emailParagraph}}
<h2 style=" margin: 0 0 23px 0">{{ title }}</h2>
<p style="margin: 0;">{{text}}</p>
{{#endeach}}

also you are closing your <h2> with a </h3>

RhodesPeter commented 7 years ago

Thanks @des-des.

RhodesPeter commented 7 years ago

Hi @des-des, I have added the css inline.

We spent some time creating the each loop with Handlebars but in the end is was creating much more code in our app elsewhere. The main reason this was happening is because sessionStorage orders things alphabetically and using the each loop meant we lost control of which order the values were being displayed in the email.