You are browsing as a guest. Sign up (or log in) to start making projects!

3h 1m 13s logged

Form submission & auth

  • Finally added backend form submission so when you click on save on the form creation page after filling in all the values, it gets created and added to the database
  • When you click on save, MacForms validates all your new form’s values (title, description, etc.), as well as each question’s choices to make sure everything’s filled out properly
  • If you’re missing fields or something isn’t validated, a helpful error message will appear telling you what to fix :thumbs-up:
  • Once you successfully submit the new form, you get redirected to the form editing page where you will be able to edit it, change its settings, check the preview, and publish it (the page isn’t implemented yet)
  • You can also delete options/choices for multiple choice questions, as long as there’s at least one available choice
  • If you’re logged in, you can see your profile icon displayed on the right of the nav bar, and clicking on it opens a menu where you can view your account profile (redirects you back to MacWeb), toggle light/dark mode (doesn’t work yet), and log out
  • I spent a ton of time trying to debug and make the log out thing work because of this entire cross subdomain auth thing that just makes everything super complicated and frustrating, but I figured it out and fixed it by changing a few auth configs
  • Designed and added the MacForms logo (just a list icon on a green background) to the nav bar and the site favicon. The design is pretty terrible, hopefully I’ll come up with a better design :heavysob:
  • Also spent a lot of time testing to ensure the app, especially auth, works both locally in dev environment and in production
  • Added a helper function to fetch form data from Prisma, destructure and sanitize the data, and do some conditional typing to match the types and ensure type safety
  • Updated README to be more informative on dev setup since there’s quite a few steps for setup and I don’t wanna forget them in the future
  • Updated schema and types
0
15

Comments 1

@RespectableDot

look at my question