open-revolution / openrevolution

Open Revolution website, courses and wiki including diginomics (introduction to the digital economy)
https://openrevolution.net/
3 stars 0 forks source link

Sign up for updates form on blog posts and main page #77

Open rufuspollock opened 1 year ago

rufuspollock commented 1 year ago

When i read a blog post I want to sign up to get regular updates so that I hear about future developments

When I read a blog post I want to see an offer for a free course so that I sign up and get the course and are kept informed of future developments

Acceptance

Notes

Discussion 2023-05-04

graph LR

d[Our page]
brevo["Brevo (sendinblue) endpoint"]

d --submit--> brevo
brevo --redirects--> dsuccess[Our Success page]
d --submit error shows errors--> d

We want to use simple html forms ...

Questions

  • [ ] How do we handle success / confirmation ✅2023-05-04 we can use a confirmation page (isn't quite so nice as a in place but hey)
  • [ ] How do we handle errors given Brevo won't do it? ✅2023-05-04 given simplicity of form we can just use html5 stuff (?)

Desire is ...

  • Want to edit in my app quickly and easily
    • Avoid: using Brevo as form editor and having to move back and forward e.g. editing forms in Brevo and then copying and pasting into a JSX component ...
  • Want form submissions straight into my main database and triggering further stuff e.g. marketing
rufuspollock commented 1 year ago

@khalilcodes can we get a separate "sign up for updates" form - and can we document somewhere how these forms get created so i can do this myself in the future?

khalilcodes commented 1 year ago

@rufuspollock here are some notes ...

My 2c is that the second option is the goto method if we want custom, simpler and least amount of jsx. In this case the code would just be ...

<form method-"POST" action="...">
  <input id="EMAIL" name="EMAIL" ... />
  <button type="submit">...</button>
</form>

The only reason for using Brevo's html and script tag (current setup) was to not redirect the user to another page after the form submits. If that's not a concern then I think we can replace.

rufuspollock commented 1 year ago

@khalilcodes great summary and agree with going with option 2.