adding more fields to a form
HGBeary opened this issue · 16 comments
I would like some info to customize "html-form-send-email-via-google-script-without-server". I need to add additional text labels but it's, apparently, not as easy as it looks!
Hi @HGBeary, thanks for contacting us!
Can you please clarify if you want new Labels or new Form Fields?
Labels describe the fields whereas fields allow you to enter/record more data.
Thanks for the quick reply! I've prepared a form for volunteer tutors to
enter their monthly hours: text fields for tutor info, student info, hours,
miles, etc. Getting all of that data into the spreadsheet is my goal. Henry
Henry G. Beary
HGB Diversified Services LLC
"Small Business Consultants"
860 350-6123 (office)
203 994-4935 (cell)
On Tue, Dec 1, 2015 at 2:25 AM, Nelson notifications@github.com wrote:
Hi @HGBeary https://github.com/Hgbeary, thanks for contacting us!
Can you please clarify if you want new Labels or new Form Fields? Thanks!—
Reply to this email directly or view it on GitHub
#9 (comment)
.
Ok. Understood. I will need to slightly modify the form handler to achieve this.
When do you need it? (we have a deadline today, but we can take a look at it tomorrow, is that ok...?)
Wow...thank you so much! Tomorrow would be perfect! Attached is a screen
shot of what my database-driven page will look like when I finally get
there; for now, the mail form will work. Thanks again, Henry
Henry G. Beary
HGB Diversified Services LLC
"Small Business Consultants"
860 350-6123 (office)
203 994-4935 (cell)
On Tue, Dec 1, 2015 at 8:35 AM, Nelson notifications@github.com wrote:
Ok. Understood. I will need to slightly modify the form handler to
achieve this.
When do you need it? (we have a deadline today, but we can take a look
at it tomorrow, is that ok...?)—
Reply to this email directly or view it on GitHub
#9 (comment)
.
@HGBeary i've updated the form handler to be generic so that you can add any fields to the form and collect any data in the Google Spreadsheet.
see: https://github.com/dwyl/html-form-send-email-via-google-script-without-server#add-your-own-fields
If you have any other questions let us know!
Thanks again for your feedback.
please ⭐ the repo to show others you found it useful...
Thanks for the updates! I've got a minor (I hope) issue: if I use
I get the message page but the data does not get emailedor put into the spreadsheet. If I don't use the id=gform I get a page of
data but I also get an email and the spreadsheet populates. What am I doing
wrong?? Here's my test page without the id="gform":
http://lvg-ct.org/Tutor-Form-monthly-report-Gmail.php Thanks again for
getting me this far! Cheers, Henry
Henry G. Beary
HGB Diversified Services LLC
"Small Business Consultants"
860 350-6123 (office)
203 994-4935 (cell)
On Thu, Dec 3, 2015 at 2:37 AM, Nelson notifications@github.com wrote:
@HGBeary https://github.com/HGBeary i've updated the form handler to be
generic so that you can add any fields to the form and collect any data in
the Google Spreadsheet.
see:
https://github.com/dwyl/html-form-send-email-via-google-script-without-server#add-your-own-fields
If you have any other questions let us know!
Thanks again for your feedback.—
Reply to this email directly or view it on GitHub
#9 (comment)
.
The gform
id is required in the form because that's how the form handler "listens" for the submission event. Try ading the id
to your form and then opening your developer console to check if there are errors. (there shouldn't be... but if there are keep the page live and we can help you debug them...)
also, consider the addressing any markup validation issues: https://validator.w3.org/nu/?doc=http%3A%2F%2Flvg-ct.org%2FTutor-Form-monthly-report-Gmail.php to prevent issues.
Thanks for the reminder to clean up my html! The attached screen capture
shows the error from the console. Thanks again, Henry
Henry G. Beary
HGB Diversified Services LLC
"Small Business Consultants"
860 350-6123 (office)
203 994-4935 (cell)
On Thu, Dec 3, 2015 at 4:22 PM, Nelson notifications@github.com wrote:
The gform id is required in the form because that's how the form handler
"listens" for the submission event. Try ading the id to your form and
then opening your developer console to check if there are errors.also, consider the addressing any markup validation issues:
https://validator.w3.org/nu/?doc=http%3A%2F%2Flvg-ct.org%2FTutor-Form-monthly-report-Gmail.php
to prevent issues.—
Reply to this email directly or view it on GitHub
#9 (comment)
.
It appears That Github does not allow images to be uploaded to issues as email attachments... Please manually upload it, or send us the link to the version of the page with the gform I'd. Thanks.
When I run the page in the Chrome debugger I get the following error on
line 24 of form-submission-handler.js:
Uncaught TypeError: cannot read property “style” of null
Henry G. Beary
HGB Diversified Services LLC
"Small Business Consultants"
860 350-6123 (office)
203 994-4935 (cell)
On Fri, Dec 4, 2015 at 2:02 AM, Nelson notifications@github.com wrote:
It appears That Github does not allow images to be uploaded to issues as
email attachments... Please manually upload it, or send us the link to the
version of the page with the gform I'd. Thanks.—
Reply to this email directly or view it on GitHub
#9 (comment)
.
Ah... that's because you have changed the DOM significantly.
the line attempting to apply the style is to hide the form once its been successfully submitted.
You are serving the page using a PHP-enabled server, this script was meant to be for static pages where no sever interaction was permitted...
You can still take advantage of the script while serving the page from PHP, but you have much more power than our original constraint dictated.
If you are going to serve the page from your Dreamhost server, and alter the page's DOM, it might be worth customising the form-submission-handler.js
and loading that from your static folder too.
How can you add a new field that has drop down options or allows users to select more than one option
@nelsonic I've added a checkbox input to my form and the corresponding column to the spreadsheet - everything else is working fine, but no matter if I check the checkbox or not, I'm getting the same value reported to the spreadsheet. Do you know how to accomplish this for a simple True/False value?
Does our OP have any more concerns on this issue? If not, please close! Hopefully you were able to get something working, but static pages are best.
For other posts, please see #31 on the checkbox input (new features/bugs should be separate issues), and same for a drop-down multi-select. I can take a look at these when I have more time.
The original issue has been resolved with the support for more form fields. Again, please post in other issues if particular fields are not working for you!
@divyats6550
This issue is >3 yrs old and I do not believe has anything to do with captcha. We have had issues around captcha if you search closed GitHub issues. We implemented a Honeypot technique and recently made it the default experience for all forms as well (that utilize the JS that is).