Skip to content

Project is created for making college offices paper free, the system includes the name, prn (a unique id for students), source, destination and many more. It automatically calculates the amount required form a to b destination and after successful payment the pass is generated in pdf format which have a stamp of college on it for the official recog

Notifications You must be signed in to change notification settings

raunakmankapure/Bus-pass-registration-system-for-college

Repository files navigation

HTMLGsheet

This repository will guide you on how to attach or use google sheet as your database for a simple HTML form This can also Guide you on how to generate PDF of latest entry made on that same google sheet it is done using Js library JSPDF using NodeJs

Steps To add Google shhet to your HTML Form: Step1: First of all go to your html code and in the form section change the name of input type as name="data[name]" as it is going to input the data that user will enter. **IMPNote: Do this for all the input labels inside input type

Step2: Then create a google sheet add the data parameters of your form in sequence that you have in your form.

Step3: Now go to the sheetdpapi, sign in with your Google account give it all the permissions and click on create new api. Then paste the url of your Google sheet their which will create a new api and generate a link. Copy that to your clipboard.

Step4: Now again in your form section add following things as is:

----- Then copy the following code: <script> var form = document.getElementById('sheetdb-form'); form.addEventListener("submit", e => { e.preventDefault(); fetch(form.action, { method : "POST", body: new FormData(document.getElementById("sheetdb-form")), }).then( response => response.json() ).then((html) => { window.open('pass.html', '_blank'); }); }); </script>

Step5: DONE.

Output:

index 2 3 4 5 6 index

About

Project is created for making college offices paper free, the system includes the name, prn (a unique id for students), source, destination and many more. It automatically calculates the amount required form a to b destination and after successful payment the pass is generated in pdf format which have a stamp of college on it for the official recog

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •