-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
077aa91
commit ee5eee2
Showing
1 changed file
with
5 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,47 +1,8 @@ | ||
# Portfolio [](https://github.com/ThisIs-Developer/Portfolio) | ||
🚀 Explore the **Simplicity of HTML, CSS, and a Touch of JS** in Building Your Unique Showcase. Let's Elevate **Your Portfolio Game** Together! 💼❤️ | ||
### Website is Live: [baivabsarkar.me](https://baivabsarkar.netlify.app) | ||
## Key Feature | ||
### Submit a Form to Google Sheets | ||
|
||
**This Portfolio Contact form can stores the submitted form data in Google Sheets using plain 'ol JavaScript (ES6), [Google Apps Script](https://www.google.com/script/start/).** | ||
|
||
Discover the Process: Learn from [@jamiewilson](https://github.com/jamiewilson) [Form-to-Google-Sheets Repository](https://github.com/jamiewilson/form-to-google-sheets/tree/master) 📝🔗 #OpenSource" | ||
### Input the <SCRIPT> in `index.html`: | ||
```js | ||
<script> | ||
const scriptURL = 'https://script.google.com/macros/s/AKfycbzwGkCv4dbdFpYjSYbThchpqYSgudoYmK_KtdmS6RkK-vyFqgPCKwxicx0xdmTErDjM/exec' | ||
const form = document.forms['submit-to-google-sheet'] | ||
const msg = document.getElementById("msg") | ||
const waitMsg = document.getElementById("wait-msg") | ||
form.addEventListener('submit', e => { | ||
e.preventDefault(); | ||
waitMsg.innerHTML = "Please wait..."; | ||
fetch(scriptURL, { method: 'POST', body: new FormData(form) }) | ||
.then(response => { | ||
waitMsg.innerHTML = ""; | ||
msg.innerHTML = "Message sent successfully"; | ||
setTimeout(function () { | ||
msg.innerHTML = ""; | ||
}, 5000); | ||
form.reset(); | ||
}) | ||
.catch(error => { | ||
waitMsg.innerHTML = ""; | ||
console.error('Error!', error.message); | ||
}); | ||
}); | ||
</script> | ||
``` | ||
## Layout of Contact form | ||
 | ||
## After clicking the "Submit" buttom. | ||
### "Please wait..." | ||
 | ||
|
||
## After sending Message. | ||
### "Message sent successfully" | ||
 | ||
|
||
 | ||
### Website is Live: [baivabsarkar.me](https://baivabsarkar.me) | ||
## Layout (Home) | ||
 | ||
|
||
## Layout (project) | ||
 |