Comments (6)
@mckennapsean After using this script for a little project, I think I would have liked the listener event to be attached to forms with a specific data-*
attribute. Something like data-form="gform"
. The script isn't really complicated as-is, but having to go in and manually edit the form handler wasn't really expected based on the project's README (which lead me to think it was generic and I could just drop it in and it'd hook into any form submission on that page)
I used this in a project that used nodejs, so what I was really hoping for was to do something like this for forget about it:
gform = require('google-form-submitter')
gform.init('my-form-id');
// event now bound to #my-form-id
Want me to do a PR?
from learn-to-send-email-via-google-script-html-no-server.
That could work, but could you be more specific
from learn-to-send-email-via-google-script-html-no-server.
The form-submission-handler.js
currently has some opinionated logic in it. For example, it expects the form to have a specific ID and have a field named email.
It would be nice if any form could be submitted, without looking for special field names and stuff like that.
from learn-to-send-email-via-google-script-html-no-server.
Definitely agree there, @dagoss. What is the best solution, do you think? Should it be a variable passed into a function that declares which form to grab data from? Or something else? We could also improve the email thing by only performing this check if such a field exists. I have just commented out that code when I haven't needed it myself.
One part of the issue is about the type of data which the form can send and store in Google Spreadsheet/email. After some PR's I sent in, this should be working with anything a browser supports (with the possible exception of IE).
from learn-to-send-email-via-google-script-html-no-server.
By all means, you are welcome to! That makes sense and sounds fairly sane, and it could even then support multiple forms on a single page with the same script. :)
from learn-to-send-email-via-google-script-html-no-server.
As a note, this original issue seems to be about:
A) supporting multiple types of input/form elements and form data
But we have also steered this discussion (based on the title, I think) onto:
B) Making the form more generic / support more options and customizations and be less "opinionated" or allow those assumptions to be overridden.
A) has been addressed in #17 (with the exception of images/files in other issues) with the test.html
file, and then B) I will add a new issue about, so feel free to continue discussion in the relevant issues.
from learn-to-send-email-via-google-script-html-no-server.
Related Issues (20)
- Concatenating Name and String to make a custom subject for each email. HOT 12
- Help with customizing the email sent HOT 1
- Redirecting? HOT 4
- Can You please provide video.
- Adding new entries to the top of google sheet HOT 3
- send email via google script html
- ajax post works on pc but doesnt on mobile phones? HOT 1
- Checkbox input fields issue HOT 1
- Hide hidden input fields in email HOT 3
- update & fix readme links
- update links
- update researching recommendations on user privacy link HOT 1
- Thank You message doesn't disply HOT 1
- Receive Pictures and Documents HOT 4
- Mail is no longer delivered HOT 7
- {"result":"error","error":{"message":"\"TO_ADDRESS\" is not defined.","name":"ReferenceError","fileName":"script","lineNumber":56,"stack":"\tat script:56 (doPost)\n"}} HOT 2
- reload upon submission HOT 2
- It only works on PC, Windows, and Android. HOT 5
- QUESTION - Does This Work With React? HOT 4
- File input
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from learn-to-send-email-via-google-script-html-no-server.