1 00:00:01,530 --> 00:00:08,220 We were working on phones, so we had made a form using of using a phone camera in general Zhangjiakou, 2 00:00:08,520 --> 00:00:14,380 so I ended up filing forms or pivo and then I had made a phone. 3 00:00:14,520 --> 00:00:17,650 So this is the look of our home than it used to be. 4 00:00:17,650 --> 00:00:23,830 The file I define to my third one was a should matter is equal to post and one was the case. 5 00:00:24,390 --> 00:00:28,600 So basically I give a quick overview of what we were going to do. 6 00:00:28,950 --> 00:00:37,310 So like when I finish this page, so basically on this, you are making a get request and on at the 7 00:00:37,680 --> 00:00:38,290 request. 8 00:00:38,580 --> 00:00:43,760 So basically this block of code gets executed and this block of wood gets executed. 9 00:00:43,770 --> 00:00:51,050 And this tells that I had imported the foam on the top of the file folder, full import store. 10 00:00:51,060 --> 00:00:52,480 You can import any form. 11 00:00:52,920 --> 00:01:01,320 So when you use to assemble, so I use forms to fill the form to dispose of the foam, which I was referring 12 00:01:01,320 --> 00:01:01,590 to. 13 00:01:02,110 --> 00:01:07,380 And then I was able to render this form on my on the front end part of my application. 14 00:01:07,410 --> 00:01:13,440 OK, so basically what we are going to do, first thing we're going to do is add bootstrap class to 15 00:01:13,440 --> 00:01:19,500 this form, to what you're going to do with your input is to find inside your file. 16 00:01:19,830 --> 00:01:23,300 So you need to define a dictionary which has given loopier. 17 00:01:23,850 --> 00:01:28,350 So basically this dictionary is defined by attributes. 18 00:01:28,650 --> 00:01:30,480 So 80 hours is a. 19 00:01:30,960 --> 00:01:32,810 This is a symbol for dictionary. 20 00:01:33,000 --> 00:01:34,560 So it has a key piece. 21 00:01:34,960 --> 00:01:40,020 OK, basically at the left, it will either keep it a key and ungraded parameter value. 22 00:01:40,410 --> 00:01:47,340 So these attributes could be anything which could be named in class, which refers to the basic syntax 23 00:01:47,400 --> 00:01:47,910 to follow. 24 00:01:48,420 --> 00:01:58,940 So what I do, I define a class and I'll give it a value of form, control or code. 25 00:01:59,040 --> 00:02:03,350 So most of us would be thinking, why only form control after class? 26 00:02:03,370 --> 00:02:06,270 But this is a different class present in the bootstrap. 27 00:02:06,300 --> 00:02:08,360 So this would make a far more responsive. 28 00:02:08,790 --> 00:02:11,700 And for the another text area, I do the same. 29 00:02:12,390 --> 00:02:15,180 OK, I'll basically copy this. 30 00:02:16,610 --> 00:02:20,000 Yes, and if not, that's fine. 31 00:02:20,360 --> 00:02:25,550 So when I looking my page, I would see bootstrappers to my form. 32 00:02:26,090 --> 00:02:31,210 Yeah, you can see the butcher has added to a form, but this is this isn't responsive. 33 00:02:31,550 --> 00:02:32,810 So what we are going to do. 34 00:02:33,180 --> 00:02:41,420 I'll go to by my phone to an IRA Glass is will call me dipsticks. 35 00:02:44,510 --> 00:02:55,490 And I put this foam inside, I did OK, and I know what I'm going to do, OK, to get the foam on the 36 00:02:55,490 --> 00:03:01,470 middle of the page I live on the style side is a little margin, zero or two. 37 00:03:02,440 --> 00:03:04,580 OK, no, this is fine. 38 00:03:06,800 --> 00:03:13,400 Yeah, now this is in the center of the page, not as good to check this box unless I press control 39 00:03:13,400 --> 00:03:13,740 shift. 40 00:03:13,770 --> 00:03:16,870 I know this looks good. 41 00:03:18,170 --> 00:03:19,220 There is some issue. 42 00:03:19,400 --> 00:03:20,340 OK, it's fine. 43 00:03:20,770 --> 00:03:22,560 OK, now this is warm and responsive. 44 00:03:22,590 --> 00:03:26,730 OK, listen to the president, but no further back and forth. 45 00:03:27,380 --> 00:03:33,340 What if I want to submit this form to someone just for the matter, to the post matter? 46 00:03:33,610 --> 00:03:37,720 OK, and I generate a token for this. 47 00:03:38,000 --> 00:03:41,860 This is person see it on the scope token. 48 00:03:43,370 --> 00:03:48,330 So a token is necessary when I need something to form my perspective. 49 00:03:48,380 --> 00:03:52,750 OK, and this is a form which I had rendered. 50 00:03:53,000 --> 00:04:01,890 And additionally, I need a button also button type to submit class beauty. 51 00:04:03,000 --> 00:04:05,910 So this is a shortfall button primary. 52 00:04:07,610 --> 00:04:11,830 This is a default bootstrap class and I give the segment. 53 00:04:14,150 --> 00:04:15,470 Now this is fine. 54 00:04:15,470 --> 00:04:16,340 And I went. 55 00:04:18,520 --> 00:04:20,480 OK, so here comes the bucket. 56 00:04:20,560 --> 00:04:30,520 I'll give a little bit as talented as Burton style is a little margin, zero or two bits of. 57 00:04:32,550 --> 00:04:37,410 OK, it is it is it it is not in the sentence I display. 58 00:04:40,630 --> 00:04:41,150 Block. 59 00:04:41,200 --> 00:04:41,720 OK. 60 00:04:42,190 --> 00:04:49,250 And what I can do do look at margin zero or two and zero for the bottom. 61 00:04:49,510 --> 00:04:57,270 So what I'm going to do so this is a third full time rotation, which is on the top. 62 00:04:57,280 --> 00:05:01,830 I'll give one round and on the left and the right or two. 63 00:05:01,900 --> 00:05:03,280 And on the bottom line is zero. 64 00:05:03,910 --> 00:05:04,940 So this will give. 65 00:05:05,680 --> 00:05:06,000 Yeah. 66 00:05:06,090 --> 00:05:12,010 So it gives a margin to one room and on the left and right or two and the bottom with the left and right 67 00:05:12,010 --> 00:05:16,150 bottom top is one at the bottom zero to this final. 68 00:05:16,630 --> 00:05:20,450 So I'll make no move to the back and cut. 69 00:05:21,040 --> 00:05:26,530 And what I told you when I refresh this page. 70 00:05:26,830 --> 00:05:29,580 OK, so I was making a get on this road. 71 00:05:30,100 --> 00:05:34,780 So when I get to on this route you can sit on the Zurin. 72 00:05:35,230 --> 00:05:36,460 So the form had rendered. 73 00:05:36,580 --> 00:05:40,660 But what if I make a post request when I would be making the post request? 74 00:05:40,750 --> 00:05:43,520 Basically I would with somebody in the phone book. 75 00:05:43,870 --> 00:05:50,560 So when I'm going to submit the form, so what I'm going to do, I'll make phone use of the dot com 76 00:05:51,130 --> 00:05:53,890 request dot post. 77 00:05:55,780 --> 00:05:58,300 OK, sorry, requestor post. 78 00:05:58,520 --> 00:06:02,740 So I get all the values when the bomb has been submitted using post matter. 79 00:06:03,500 --> 00:06:04,750 OK, ok. 80 00:06:04,750 --> 00:06:11,200 But still I'll make a condition to check for what is underscored by. 81 00:06:14,930 --> 00:06:25,380 It's a little violent to make sure the form is valid and I'll make title is equal to request post and 82 00:06:25,400 --> 00:06:36,800 title tight time done, OK and subject so or I'll make again the same request for the subject. 83 00:06:36,800 --> 00:06:43,580 Subject is to request post and subject 84 00:06:45,860 --> 00:06:58,580 underspecified and I would print the title here and print subject here. 85 00:06:58,590 --> 00:07:01,280 OK, and I'll return an a response. 86 00:07:03,720 --> 00:07:08,690 OK, but I'll make up that is going to SDR. 87 00:07:11,020 --> 00:07:13,270 Form submitted, 88 00:07:18,420 --> 00:07:23,320 plus start the quest dot. 89 00:07:24,630 --> 00:07:25,650 Methods. 90 00:07:25,770 --> 00:07:28,090 OK, so this is find it here. 91 00:07:29,010 --> 00:07:40,450 Yeah, no alternate legislative response so that, OK, if this form is not valid, what to do? 92 00:07:41,490 --> 00:07:45,620 So what I'm going to do, I'm going to render the form again. 93 00:07:45,630 --> 00:07:53,690 But OK, and I define my dictionary is equal to distinction is going to be the same as this one. 94 00:07:53,880 --> 00:07:54,660 And you can see 95 00:07:57,690 --> 00:08:00,270 form on. 96 00:08:01,470 --> 00:08:15,480 Fall, OK, and this and it could be copied, this ends OK, now this looks like this. 97 00:08:15,950 --> 00:08:19,890 I'll give you a quick overview. 98 00:08:22,500 --> 00:08:30,630 Is the request or method both get this block of code gets executed in which it says I'll render the 99 00:08:30,630 --> 00:08:32,000 form on the front part, OK? 100 00:08:32,760 --> 00:08:40,110 When I submit this form so this block will be executed, which is request the method is equal, is equal 101 00:08:40,110 --> 00:08:40,710 to post. 102 00:08:41,040 --> 00:08:42,630 So form of feedback form. 103 00:08:42,630 --> 00:08:44,760 I'll get all the editing requests or post. 104 00:08:45,120 --> 00:08:50,880 If the form is valid, then I'll get the two values that the subject and title that brings the title 105 00:08:50,890 --> 00:08:51,660 for the subject. 106 00:08:52,140 --> 00:09:01,650 And I have given a name variable which has form sorted by request or the response of where else in the 107 00:09:01,650 --> 00:09:03,500 form was not valid. 108 00:09:03,510 --> 00:09:09,210 So you need to check that if the form was not valid. 109 00:09:09,360 --> 00:09:12,150 So I would render the font on the front part again. 110 00:09:12,330 --> 00:09:14,510 OK, it's almost not valid. 111 00:09:14,700 --> 00:09:25,060 So what I'm going to do it is I messed up. 112 00:09:26,230 --> 00:09:30,390 They both ok, but OK. 113 00:09:30,390 --> 00:09:32,250 Before this I start my salver. 114 00:09:36,290 --> 00:09:36,640 OK. 115 00:09:37,730 --> 00:09:38,930 Yeah, that's fine. 116 00:09:39,520 --> 00:09:41,330 OK, I'll refresh this page. 117 00:09:41,750 --> 00:09:42,150 OK. 118 00:09:42,470 --> 00:09:49,100 Now, when I read the speech, I made a request, so I render the form the front in part so that I'll 119 00:09:49,110 --> 00:09:52,120 give a title and sit at the table. 120 00:09:53,530 --> 00:09:55,400 I'll make no submit this form. 121 00:09:58,670 --> 00:10:06,400 OK, so I submitted to public notice form submitted posts, so this was a matter which I had to find. 122 00:10:06,830 --> 00:10:14,940 So when I submitted the form to this block of bureaucrats executed and here you can see that I had executed 123 00:10:14,960 --> 00:10:16,060 opening statement here. 124 00:10:16,090 --> 00:10:18,140 One was a title and one was a subject. 125 00:10:18,290 --> 00:10:20,000 So title corresponds test. 126 00:10:20,510 --> 00:10:25,870 And this Hagans test was title and I was stay in my subject. 127 00:10:25,880 --> 00:10:28,230 But so, so thank you guys. 128 00:10:28,240 --> 00:10:28,970 Thank you so much. 129 00:10:28,980 --> 00:10:30,800 I'll catch up in the next Tokura. 130 00:10:31,160 --> 00:10:34,880 So you need to be very careful by writing this code. 131 00:10:35,090 --> 00:10:40,370 You need to be very careful about writing, which if condition is come inside, which if then else that 132 00:10:40,390 --> 00:10:40,970 elif part. 133 00:10:41,300 --> 00:10:46,100 So you need to have a quick overview on this. 134 00:10:46,430 --> 00:10:54,080 So in the next period we are going to know how what happens if the user into form is not provided something 135 00:10:54,080 --> 00:10:58,610 is wrong then how we can errors related to that file on the front end part. 136 00:10:58,620 --> 00:11:00,650 OK, so thank you guys. 137 00:11:00,650 --> 00:11:01,450 Thank you so much. 138 00:11:01,460 --> 00:11:02,930 I'll catch up in the next lecture.