mirror of
https://github.com/dwyl/learn-to-send-email-via-google-script-html-no-server.git
synced 2026-04-03 00:09:04 -06:00
add support for binding listeners to multiple forms #311
Labels
No labels
Priority-1
Priority-1
Priority-1
Priority-1
Priority-1
Priority-1
Priority-1
Priority-1
awaiting-review
awaiting-review
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
chore
chore
discuss
discuss
discuss
duplicate
duplicate
duplicate
duplicate
duplicate
duplicate
duplicate
duplicate
duplicate
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
epic
epic
external-dependency
external-dependency
external-dependency
hacktoberfest-accepted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
in-progress
in-progress
in-progress
in-review
invalid
invalid
invalid
invalid
invalid
invalid
invalid
invalid
invalid
merge-conflicts
merge-conflicts
please-test
please-test
question
question
question
question
question
question
question
question
question
question
question
question
question
question
question
question
question
question
question
question
question
question
question
question
question
question
question
question
question
question
question
question
question
question
question
question
question
question
question
question
question
question
question
question
question
question
question
question
question
question
question
question
question
question
question
question
question
question
spam
spam
starter
starter
starter
starter
starter
starter
starter
starter
starter
technical
technical
technical
technical
technical
user-feedback
user-feedback
user-feedback
user-feedback
user-feedback
user-feedback
wontfix
wontfix
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github/learn-to-send-email-via-google-script-html-no-server#311
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @mckennapsean on 8/13/2017
Currently, the clientside JS attaches to just a single
#gformelement. When using two forms with that same ID (which, by the way, you should always have unique IDs for forms), then only one form works correctly #107.One partial fix is to load the clientside JS manually into your own file, and add duplicate code for different IDs. This is less elegant and prone to errors. It does not allow someone to just refer to the GitHub JS code and get live updates for free.
Another solution is to allow the JS to attach listeners to any form that uses a class of "gform" or
.gforminstead. This would require a small rewrite to allow multiple listeners to be made, instead of just one. This would be fairly trivial to perform.However, we probably don't want to break existing forms. This means we would want to have a selection of both
#gformand.gform. This is because our tutorial advises people to load the current version of JS directly from GitHub's master version here.This also has the potential to break other people's pages if they were using the class
gformon any form fields and are pulling the code from the GitHub site.Another option, we could provide a debug message / warning to people loading with
#gformthat it is deprecated, if we wanted to remove it in the future.