Get form submission responses into Google form

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
all right guys so if you thought we are done with the form uh we are not yet because um form has a purpose you should be able to get user feedback right so if you're not getting it what's the point now here what I'm doing is I wrote about it uh maybe some time ago that how you can get Palm input uh from a custom form instead of this ugly looking Google form you can get it through just a link uh I made a video on it and we are gonna use that here okay so it's gonna be quite nice because we are doing it on a server file we do get a feedback of whether the form submitted or not so that's quite nice now in order to do that the first thing is you should have a form so which is in line with what you have here okay so let's do that uh so this would be name and uh next one is email so don't put any validation for this because we don't want to stop at any stage because we are already validating using uh in in the front end itself we are validating so don't put any uh don't even click the required not not required okay so now our form is ready so we'll do something like uh predict walk through um so that should be okay so form is ready so we also we are uh gonna get stringfully okay so in pre-filling what you do is we you enter a name you enter uh email hello at uh dot com and then you enter some message uh this is uh test you get the link you copy that now we'll come here we will put it somewhere maybe we want it here instead of this console yeah put here on statical link equals should I put it like this way okay now here uh if you if you look at it carefully so you will see there is uh the name that I entered email that I entered and also the message I entered right so we will have to replace that a way to replace that is using uh template literals here and we can replace that with our value so this would be name we should use a a dollar sign and curly places this will be email and finally this is message okay so that's it our free full link is ready now we have to do it here nowhere else because it is it has passed all the tests if it fails it goes to the catch block here since after this validate we are still here we have come here so which means you know our name email and message are valid now once that happens so we'll do const response equals a weight we just uh make a get request to this but before that we'll have to make few changes so that I have mentioned here a few things we'll do those uh where is it okay so slash review form should be slash form response so let's go and find it so here it is right so that we changed to slash form response okay and add at the end of the URL okay so let's add this what's up now that is ready so now we can do uh we can either make the user to redirect to this or just make a fetch request to pre-filled okay okay now we can control the response let's see what happens okay contact form I enter my name my email and uh this is test submit it's submitted okay let me go to the form okay so there is a response and that is what I entered I can also get this to a spreadsheet but I don't know if that's that is necessary once I host this site I will make that public so yeah so let's enter something uh something else now test submit let's go here so it's already there so yes so this is quite useful so you can get your responses directly to your email if you set this up properly you can also get emails I mean you will get emails I think if somebody has sent a response so also after submission if we check our console here the server console we see that the status is 200 right so here also you can check whether it is submitted or not and based on that you can throw another they will go to the you know so that they can go to this block error block so that's something you know you can easily do so what you do is if less sorry let's start I think it's status 200 right is not equals okay 200. in such cases it means that in a form is not submitted so you do something like you return something saying Google form a valid form the Palm you know Fields were valid but it did not go to Google for else you can you know you will always go here to return statement so I I you know it's it's not quite necessary at this moment but if you want you can have a extra check here so that you don't miss out on some kind of error someone someone someone might get back to you saying you know I got this error uh and maybe something is wrong with your mom or maybe your Mis I mean you have deleted this form you don't even know so these things happen so it's better to have a check here and return a similar you know error saying similar thing but the errors should have an error message saying uh the back end there was something wrong with the server right all right so that was it for this one so I'm going to remove this so this is about how you can uh you know get the response from someone to your Google phone if you have one all right guys that finally finishes our contact firm so it is a working form now so in the future videos uh you will see uh more things added to this website thanks guys bye
Info
Channel: WebJeda
Views: 1,560
Rating: undefined out of 5
Keywords: sveltekit, sveltekit tutorial, google form, custom
Id: 4XCGuchFiac
Channel Id: undefined
Length: 7min 53sec (473 seconds)
Published: Mon Jan 02 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.