Coder Social home page Coder Social logo

vebpath / sheetform Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 292 KB

Sending form data to a Google Sheet allows you to collect and organize information submitted through a web form directly into a spreadsheet.

Home Page: https://vebpath.github.io/SHEETFORM/

HTML 51.44% JavaScript 15.87% CSS 32.69%
databse formsubmit googlesheets htmlforms senddatatogooglesheet

sheetform's Introduction

Send Form Data to google Sheet

Sending form data to a Google Sheet allows you to collect and organize information submitted through a web form directly into a spreadsheet. By integrating Google Apps Script with your HTML form, you can capture user input and append it to a specific sheet within your Google Sheets document. This process streamlines data collection, enabling efficient analysis and management of responses.

Screenshot

App Screenshot

Demo

Pages

Sheet Script

let sheet = SpreadsheetApp.openByUrl(SheetLink);
let sheetName = sheet.getSheetByName('Sheet1');
function doPost(e){
  let data = e.parameter;
  sheetName.appendRow([data.COURSE, data.NAME, data.EMAIL, data.PHONE, data.ADDRESS, data.MESSAGE, data.GENDER]);
  return ContentService.createTextOutput('data saved');
}

JAVASCRIPT CODE

let form = document.querySelector("#form");
let url 'DEPLOY URL';
form.addEventListener("submit", (e) => {
  e.preventDefault();
  init()
  let formData = new FormData(form);

  fetch(url, {
    method: "POST",
    body: formData,
  })
    .then((res)=>res.text())
    .then((data)=>{
  //DO STUFF HERE
    })
    .catch((error) => {
      console.error("Error:", error);
    });
});

sheetform's People

Contributors

vebpath avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.