Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adding more fields to a form #9

Closed
HGBeary opened this issue Dec 1, 2015 · 16 comments
Closed

adding more fields to a form #9

HGBeary opened this issue Dec 1, 2015 · 16 comments

Comments

@HGBeary
Copy link

HGBeary commented Dec 1, 2015

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!

@nelsonic
Copy link
Member

nelsonic commented Dec 1, 2015

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.

@HGBeary
Copy link
Author

HGBeary commented Dec 1, 2015

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 [email protected] 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)
.

@nelsonic
Copy link
Member

nelsonic commented Dec 1, 2015

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...?)

@HGBeary
Copy link
Author

HGBeary commented Dec 1, 2015

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 [email protected] 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)
.

@nelsonic
Copy link
Member

nelsonic commented Dec 3, 2015

@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...

@HGBeary
Copy link
Author

HGBeary commented Dec 3, 2015

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 emailed
or 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:https://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 [email protected] 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)
.

@nelsonic
Copy link
Member

nelsonic commented Dec 3, 2015

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.

@HGBeary
Copy link
Author

HGBeary commented Dec 4, 2015

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 [email protected] 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)
.

@nelsonic
Copy link
Member

nelsonic commented Dec 4, 2015

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.

@HGBeary
Copy link
Author

HGBeary commented Dec 4, 2015

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 [email protected] 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)
.

@nelsonic
Copy link
Member

nelsonic commented Dec 4, 2015

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.

@estettin
Copy link

estettin commented Feb 1, 2016

How can you add a new field that has drop down options or allows users to select more than one option

@ghost
Copy link

ghost commented May 9, 2016

@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?

@mckennapsean
Copy link
Collaborator

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.

@mckennapsean mckennapsean changed the title Continue The Tutorial request adding more fields to a form Jul 19, 2016
@mckennapsean
Copy link
Collaborator

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!

@mckennapsean
Copy link
Collaborator

@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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants