Open medic-code opened 3 years ago
Done some initial research into this.
On the HTML side: modifying the HTML form action attribute to point towards the api, once it's hosted on heroku.
On the JS side will need two additional methods and another event listener for submission button.
Methods 1) Handles the form submission (prevents the HTML from submitting and then instigates the method below) 2) To use the fetch method to do the HTTP post request to the API.
Event listener
An event listener that listens for submitting and fires the 'handling form submission' method.
Thinking about the front end aspects to allowing users to input their hours and course.
Modify the existing form we have to automatically post to database when clicking submit for example. Thoughts appreciated.