1 00:00:00,120 --> 00:00:06,720 Now, we are going to add that at the function to the form, and first thing we need to do is when you 2 00:00:06,730 --> 00:00:12,410 click the pen icon, it should get the eye of this document. 3 00:00:12,720 --> 00:00:20,750 And if you remember, when you click on the icon, you can see that is a habitat pop up from the text 4 00:00:20,790 --> 00:00:24,540 content and then you click on the icon. 5 00:00:24,750 --> 00:00:27,210 It will pop up to test delete. 6 00:00:27,360 --> 00:00:35,430 So we have to back to the item container and check whether the text content is added. 7 00:00:35,640 --> 00:00:44,700 And first, we are going to create the update I.D. so stored ID to this variable where the user click 8 00:00:44,700 --> 00:00:46,290 on Depend Icon. 9 00:00:46,740 --> 00:01:02,300 So now we are going to check if the content is equal to at it, then update it is equal to this attribute. 10 00:01:03,150 --> 00:01:04,140 So now if we. 11 00:01:05,990 --> 00:01:14,900 Cuonzo a lot of the I.B. and now if we take on the icon, you know, this is because we have an ad, 12 00:01:15,650 --> 00:01:18,820 the Entropia at this icon. 13 00:01:19,310 --> 00:01:25,320 So we also need to copy these and pasted to the icon. 14 00:01:25,640 --> 00:01:30,650 Now, if we refresh and click on the button, you can see the idee. 15 00:01:32,440 --> 00:01:33,680 Of each document. 16 00:01:34,180 --> 00:01:45,340 Now, we already got the I.B. so we can go to NICTA, put requests when the user click on the update 17 00:01:45,340 --> 00:01:45,880 button. 18 00:01:46,360 --> 00:01:49,450 Now, we already have the idea of form. 19 00:01:51,980 --> 00:02:01,610 So we can use these and then you start on social media, and then the first thing is we ran the default 20 00:02:01,610 --> 00:02:09,590 action, which was reload a page, and then we let the data is equal to new form data. 21 00:02:10,640 --> 00:02:18,740 And then we passed the exit form to form daytime's interface, provide a way to easily construct a set 22 00:02:18,740 --> 00:02:27,310 of key value pair representing the form fields and also values so we can in order to see the data that 23 00:02:27,920 --> 00:02:28,910 we can type. 24 00:02:29,820 --> 00:02:30,450 Like this. 25 00:02:31,530 --> 00:02:38,850 And then we type at home and then we type Chouf and then update you kind of see these key values pair. 26 00:02:39,850 --> 00:02:47,860 And these things is just for you to look at the data inside, so we do not need to care about this. 27 00:02:48,860 --> 00:02:53,670 Now, after we already have the data, we are going to make a request. 28 00:02:54,350 --> 00:02:56,720 So we are going to use the asinger wait 29 00:03:00,560 --> 00:03:10,040 and then we let the response is DeCota and I wait and fach items. 30 00:03:12,360 --> 00:03:22,770 And then we use the method you put and the header and actually we may copy from this documentation and 31 00:03:22,770 --> 00:03:34,140 I will also put it in the link, and this is how to post the data with a content type in this form so 32 00:03:34,140 --> 00:03:37,850 we can copy these body and headers. 33 00:03:38,460 --> 00:03:50,400 And then we repace this after we get a response, we can let the result is equal to a great response 34 00:03:51,420 --> 00:03:51,750 on. 35 00:03:52,920 --> 00:04:01,740 And after we already update the reality, we can be set to form and also we can refresh the page and 36 00:04:01,740 --> 00:04:05,610 now we can see whether we can update the form first. 37 00:04:07,020 --> 00:04:09,880 So we go back to the Web page and refresh. 38 00:04:09,900 --> 00:04:19,170 Now we go to edit the phone one, we try to correct this to Apple and make a price to one hundred. 39 00:04:19,350 --> 00:04:21,140 And then we take update. 40 00:04:21,330 --> 00:04:24,840 Now you can see it already update the values. 41 00:04:25,200 --> 00:04:35,100 So now what we can do is and in order to let the user note it already update successfully, we can use 42 00:04:35,100 --> 00:04:45,450 alert and we put the we s thought, I say, because if you look at this, you can see our object properties 43 00:04:45,750 --> 00:04:46,350 message. 44 00:04:46,710 --> 00:04:50,500 So we have to put some thought message here. 45 00:04:50,850 --> 00:05:01,110 So now if we refresh the page and if we take on it and then we on this as the phone again and then maybe 46 00:05:01,110 --> 00:05:07,910 form five, the price is five hundred and update update successfully. 47 00:05:08,160 --> 00:05:14,250 And you can see inside the index page already changed the most updated items.