top of page

Building A Social Network in Wix | Part 18 | Delete Functions | Corvid by Wix

Hey, Wix Nation MPS here from Wix Training Academy and boy do I have a special video for you today? Maybe something to do with social networks, building them in Wix, somewhere along that line.

Anyway, if you're here for the first time, thank you very much for heading over here, but what you need to do is you need to make sure you click that subscribe button. You want to know why? Because we are Wix Nation. That's right, because of you guys we are no longer just the Wix community. You have made Wix Training Academy, Wix Nation. So come on aboard, join us as we dive into tons of tutorial and content here on Wix Training Academy.

Next, if you haven't already make sure you head over to and go ahead and click "Yes, I want free Wix content" or get access to the Academy to get free access to tons of my content. And if you want to save some time, some stress and some frustration, and you're a busy business owner, startup owner with a trillion things on your list. And the last thing you want to do is worry about building out your website or your platform. Just scroll down the homepage and fill out this form right here to submit a project to my team. And I, and we would be more than happy to go ahead and start our conversation together to get you hooked up with our team and web development.

So guys let's jump into today's video, which is how to create a delete function for your social network.

Creating A Delete Function

So yes, building a social network is exciting, but we all know that sometimes people post content, they wish they could take back. How do they get rid of that content through a delete function? Right? We've all seen it. We've seen it on Facebook. We've seen it on LinkedIn. We've seen it on Instagram, Twitter, whatever social network you want to name. There is a delete function there because well, for obvious reasons, people sometimes don't mean to post something or want to delete something. So let's show you how to build that out in our social network here on Wix.

So what we're going to do is we've got our site here. If you haven't been following, I'll put the link down in the description for the entire series where on part 19(18), I believe now. So you can see you've got a ton of videos to go ahead and watch if this is your first time over here. But if you're all caught up, here we go.

So we've got our user status page here, right? This is something we built out way back when, so now what we need to do is we need to create a button. So we need to add a button we're going to go to add, and then we're going to go to button and I'm just going to click this one here, similar to the other one we have. And then we're just going to drag it over here. And guys, I'm not going for any aesthetics. Really? I'm not going for super nice design here. I'm showing you how to get it done, right? Getting down and dirty into this delete function.

So we're then going to rename this to delete, I'll say delete post. Okay. So we go ahead and we have delete post. Now what we need to do is we need to create, I'm going to delete that. Pretend it wasn't there. What we need to do is we need to create a data set that will allow this function to carry out. So we've got a dataset already that carries the data from the database to the user statuses repeater here, but we need to create an additional data set that set to read and write. So that way the data can be manipulated or deleted.

So what we're going to do is we're going to go down here to this data button. We're going to go to add data elements, data set, and we've got our dataset. So now what we're going to do is we're going to click settings and connect collection. It's going to be attached to this is the database it corresponds with is user statuses.

Now what we're going to do is we're going to put the mode to read and write why? Because that allows the user to modify the content in this collection, which means the delete function can be carry through. So now that we set that dataset to read and write, I'm going to go ahead and rename it because we've already got a user statuses dataset on this page. I don't want it to get confusing. So we're going to name it, User Statuses Read and Write and there we go.

Now we've got a data set name now what we need to do. So we've created our button, we've created our data set that will carry through the delete function, we have to go ahead and actually connect this button to that data set with the delete function attached. So how do we do that? We're going to go ahead, click this connect to data button. You guys should get this down. You've done this many, many times over and now it's one more step in creating a cool new function.

We're going to click that connected data button, right? We're going to choose our dataset. Remember we're choosing the reader and write one, read and write one. Now click action connects to so when this button is clicked, what happens? We don't want it to submit. We don't want it to load more. No, we want it to delete right. So it will delete that listing or that line in the database. So whatever that data is, will be deleted upon the clicking of this button.

Now that the delete function is there, what I'm going to do is I'm going to throw some sample data here into the database, just so you could kind of see how this works. So I'm going to go to the user statuses and I'm going to create a couple more statuses."Hello there, join my team. And I, for some web dev". If you guys have a web development project, come join us. Our team is ready, standing by excited to learn more about you and your project. A site files. Here we go.

Well, not really feeling any of those, but what I am feeling is this handsome man right here. Who can this be? Wait, let's let it load. Let's let it load no way it's MPS. Can you guys believe that let's get a thumbs up. I'm just kidding. Thank you guys though. If you did give a thumbs up because you saw a picture of me that's heartwarming.

So let's add one more status just so you kind of get a feel for how this works. "Thanks for watching like, comment and subscribe". Now that one was not a joke, please. If you're watching this, let me know how I'm doing, like comment and subscribe. We'll just click this little guy right here. So now we've got three pieces of sample data in our sandbox database. So if I now go to preview, all right, guys. So this is a very raw version of the delete function, but I'm just going to show you how it works. So this is no like confirmation after deletion. This is like raw deleting an item from the database show.

If I were to click delete posts right here, it has just deleted. But, let me show you how, if you go back now into our data in the database, user statuses. You'll notice that two of those statuses we created have been deleted now that does not mean there's not more work to be done. When building out this statuses page, you'll notice that the status it's still self still stayed there. Right? But you can see there's the new status, which is the final status there.

So we've got some work to do with this social network. We've got some work to do with the status page, but that's how you create the delete button in the delete function here in Wix notice, I just had my glasses on. So that's, that's how that works.

We're going to dive deeper into this whole statuses social network throughout the week, throughout the next month. So there's a lot to cover but I wanted to at least get that to you because I know a lot of people ask me that, you know, how do I delete this from the database or how do I delete a status from users, user statuses. And that's how it happens. You create the button and you add it as a delete function using the read and write dataset. That's how you do it.


So if this video helped you out drop a like down below, I hope it did. Comment if you've got any questions whatsoever and don't forget to subscribe down below and turn those bell notifications on, join us here Wix Nation, be part of the tribe. Be part of the nation. That's right. We're no longer just small little community. We have now grown into a nation. Thankful for you. Thank you. Thank you. Thank you. Thank you. But that's about it guys.

Obviously don't forget to head over to Wix Training Academy, Yes, I want free which content, if you want free Wix content. And if you want to hire our team to get a project started and build out your website or your platform to get it done, right? Either click work with us in the menu or scroll to the bottom of the homepage and fill out this project submission form, and we'll get you all hooked up and start our conversation together. I appreciate your time today. Hope you guys enjoyed this and I will catch you in our next video.

76 views0 comments

Recent Posts

See All


bottom of page