The section is about creating a fully functional Ajax contact form for your Web application, so we've
got the contact form.
So with HTML, we set up some input fields and email field a message areas using text tag, text area
tag and then a button to send the content.
So this is still running on our local machine.
And when we send and do a submission of the data, it sends the data over and it adds it into a spreadsheet.
So whatever content we had within the fields there is added into the spreadsheet.
In addition, we also get an email being sent to us when we submit the data.
So let's try that one more time.
And this time I'll just use Tester and test email and for the message to Hello World and send that over.
And then we've got the sending so that test information deposited into the spreadsheet.
And as well, we got an email when that submission was completed.
It's also going to check to make sure that we've got the proper content structure.
So we're doing some validation to make sure that it is a valid email address as well as the name needs
to have at least five characters, so used to be at least five characters, and also that this needs
to be within a valid email type format.
And once it is, then it will send the message and that means that we receive it within the sheets.
So we are going to be using Google Apps script.
And if you're not familiar with Google Apps script, this is modern a JavaScript within the cloud.
It allows you to connect the Google services together and you are going to need to have a Google account.
So I'm just using my regular Gmail account.
So you are going to need to have a Google account in order to access and create a spreadsheet and then
also access app scripts running within your Google account so you can as well copy and paste the code
that we currently are going to be providing for the app script and just accept the permissions, deploy
the app and it will run the same way.
You will need to update your EITE for the spreadsheet and as well, your end point is going to be different
for the Web application.
So when you do deploy it, you can select and within the managed deployments you can select as well
the endpoint.
So it is a fairly long address.
Its script, dot Google dot com forward slash macros for its large library and then a whole bunch of
unique characters.
And at the end it's going to say X E.
So that's the executable version of the endpoint.
And then that endpoint is what we're going to copy into the JavaScript project that we're building.
So there's the endpoint there that I've been using and most of the staling we've done with each HTML
and see us.
So we've structured the input fields, added them all, hardcoded them as an input form and then applied
some styling to them.
And then within the JavaScript we're selecting the form object and then we're doing a submission.
And this, of course, is going to be a fetch request using the post method string of flying all of
the input field content and sending it over to the server.
And then as well, we do our getting the response back from the server so you can customize this as
needed.
So if you do have any questions or comments, I'm always happy to hear from you.
So let's get started building this exciting project from scratch.