I’d like to add a city field to the user profile in Yii2-User using Google Places Autocomplete API.
I’ve managed to add the field (and hidden fields) to the registration page, I’ve managed to have the hidden fields populated as they should when a city is selected, but I’m just not clear on how to get everything in the database on submission.
Obviously, I need to have the city be created in the DB if it doesn’t exist yet before it’s linked to the profile but I’m not sure how to do that.
My relevant code so far is in the following pastebins :
Thanks ! I am indeed using dektrium/yii2-user. I’m not familiar with these events callbacks, if you have more information, that would be great, otherwise, I’ll look into it