Building A Social Network in Wix | Part 21 | Changing Location in Profile with Database



What's going on Wix Nation? MPS here from Wix Training Academy and today I'm bringing you another Building A Social Network in Wix video.


Before we dive into today's content, which is changing the location on the profile page to an actual address location that you can click let's first discuss something. If you're brand new here, click that subscribe button. Come on guys. I love to see it. And the community loves it. You'll never miss any Wix Training Academy content and you'll instantly plug into 29,000 plus other like-minded entrepreneurs.


So click that subscribe button in the bottom, right? And turn those bell notifications on next, if you haven't already. And you've been following this building a social network in Wix series, you're going to want the code snippets. So come over to wixmywebsite.com and then just scroll down to join the Academy and join the Academy. All you need is an email and a password completely free, no strings attached. That's it instant access to tons of Wix content. Plus the code snippets from this series. So I think you'll want to be in there.



Changing Location in Profile with Database


So guys, what are we doing today? Well, what we are doing is we see this little location guy over here on the profile page right now, it is a text field in the database, which is fine. And you can keep it a text field if you want. But you'll notice in some of the newer social networks and some of the updates that people can actually click on a location and it brings them to that location, whether that be in like Apple maps or online Google maps, anything like that.


So what we're going to do is we're going to lay the foundation of that today. And I'm going to show you in the database this is going to be a very quick and easy tutorial. I'm sorry. It's not going to be super in depth, super involved something amazing that we're doing in this series today. But it's something that could be pretty nice and a nice little addition to the network. So what we're going to do is we're going to be in the database and I'm going to show you how to kind of change that field to an address field and how we can upload it as an address rather than just a text field. So with that said, let's dive in.


If you haven't already make sure your Corvid tools, your Dev Mode is turned on. So that way we can access our database what database are we. By the way, guys, I don't know if you saw this, but there's a new, a little icon in the Wix editor. Like a quick link. If you will, it's called Data.


Get to get to know this, get familiar with it. It's a very nice, nifty, new, quicker way of accessing your databases. If you click Data, you'll see your data manager here and you can access all of your databases right here. That's right. If you didn't already know this value bomb dropped. I think that deserves a subscription. Don't think this kid, but hey, if it deserves a like, maybe a like will be due or like we'll do. So if we could drop that down below, that'd be awesome. Just going guys. I really appreciate you watching.


What we're going to be in is we're going to be user profile data. So if we click user profile data, this is where all the profile information or the profile data from our profiles is stored. Right? So right now we can see all of our current fields in here. We can see, wow, who is that good looking man, right there. Just kidding guys I'm in a funny mood today. So we've got our profile data right here, but if we scroll over, we can see profile location right now.


This is a text field, again, nothing wrong with it being a text field. But if you want it to be more of like a clickable location, like an address, what you can do is we can come in here to profile location, or you can create a completely new field depending on how you want to go about this. I'm just going to edit, come in here, click the three little dots manage field, and we can see something here. So we've got the field name, the field key, but the field type.


So if you can see, Wix has added a whole bunch of new types of database fields which is really, really cool, including audio. So those of you out there watching this, I want to build some so like music sharing, social network here's your key. We'll touch that later.


What you'll see here is you'll see address as an option. So if we change this to address and we click update, it says changing this field may break page connections. It's okay. We're going to continue. And then we've got that in here.


Here's the thing, when you change it to yet to address, this is the only thing you have to be aware of. So if we just type this in your user can add this, but any active profiles, like it just said it could break page connections. Like it literally just happened. It got rid of what was currently in there. So I'm just going to change this back to Gilbert, but watch this. So now it says Gilbert, Arizona, if I sync this, we don't really have to sync it. I'll just keep it in sandbox. Wow. Do I want, yeah, no, I'll go to life. You guys are going through my decision making process.


So we're going to sync our data to live essentially. What that means is it sends it from this backend editor sandbox database to the live database. So now it says Gilbert, Arizona. So now if we go in here, we publish and we preview it should switch it up here on the actual profile page itself. Now we're going to see if that holds to be true.


If we go to preview locations should update. Oh, I guess I should probably start by connecting that data. So if we go back to the editor you'll notice that we've actually just never connected this data yet, or maybe we have, have we? Have we connected the data? Well, I think we have we have connected the data. So maybe it's because I was not in the published mode. There we go. It's loading. It's because we were in preview mode. So that was the problem. I didn't go to the published version of the website.


So now if you look on here, it actually shows Gilbert, Arizona, United States. Now I didn't do the clickable version on here yet because there's some backend development that has to happen with like Google maps per se, to pull that information in not saying we can't do it, but you do need a Google maps API to do that. Not a problem. But we are going to have to do that in a separate tutorial so I can show you because that's a tutorial in of itself, but you can see it's kind of cool because now a user can actually select their physical location. Whether that be an address, if it's a business, whether that be a town, a city, a state, and it'll actually pull the information as is, you can see Gilbert AZ USA. So it's kind of cool how it goes about that. And you can see how it did that back in the database.


So like, for example, I'm just going to show you another example. Let's just say I'm going to wait for the data to load here. Let's just say I'm not in Gilbert anymore. I'm in guys, this is a big reveal. I'm actually moving here in a year, Boston, Massachusetts, one year from now, literally about a year from now. And I'm going to sync this with my girlfriend. Yes, we are still together. Anyone that's been following our journey, that's been on this channel for a long time and OG subscriber knows that Delaney is my girlfriend and her and I are actually moving up to Boston a year from now. Once we finish our last semester at school, we start our senior semester at college here in about a month. So pretty exciting stuff.


I'm going to go ahead and sync this. And now what's going to happen is now that is synced to the live database, I'm going to publish the site again. And you're going to see how the change just reflects on the profile page. And maybe this is just cause I think it's kind of cool how this stuff works. Maybe that's just me, but if we go back here and now it says Boston, Massachusetts, USA. So what essentially I'm trying to say, here is your user, your profile, the profile user can actually change their location to they can do this using that editing profile. As you can see right now, we just have an edit full name. We don't have it over here under the location, but they can. And I'm going to show you a full length tutorial on a full profile editing very shortly. So you will be able to see that as well. But that's how it works guys. So it's, it's actually really pretty cool how this whole process works.



Conclusion


So I hope you enjoyed this little tutorial on, you know, changing your location, making it an address rather than just basic texts where people can enter anything. If you have it set as a location field on your social network, you probably want people to enter a location, not something random that that shouldn't be added, right? So this will prevent that and it'll also make it a cool, nifty little feature.


If this video helped you guys out, go ahead and drop a like down below. Why? Because who doesn't given likes out, it's the holiday season. Number two comment. Let me know if this video is helpful and what type of social network your building and what type of tutorials you would like to see in this series. So I can continue building out tutorials for this series. And then lastly, make sure you hit that subscribe button and turn those bell notifications on guys. That subscribe button is red. And guess what? It's the holiday season, Christmas colors are red. So let's just melt the two together and click that subscribe button because it's a season of giving and turn those bell notifications on. But seriously, we actually have a goal here at Wix Training Academy of reaching 50,000 subscribers on this channel, adding new community members by March 1st. And I need your help to get there. I'm not naive to that.


So if you can help us out, you can share this content with other like-minded entrepreneurs that can benefit from it. That would be awesome. And it starts by clicking that subscribe button, turn those bell notifications on and you get head over to wixmywebsite.com link in the description to get that free access.


Other than that, I really, really appreciate your time today, guys, the holidays are coming up really, really fast. Can't believe it's already December. We just got through Thanksgiving and we're working towards Christmas, but hopefully this like little stretch of the next 24 to 22 days or so will go by a little bit slower so we can just enjoy that holiday spirit. I'm a super big fan of it. Not sure if you are, maybe let me know in the comments below, but I love the holiday.


So let's go ahead and move into it strong and enjoy this season together. Thank you guys for watching catch on our next one.


36 views