1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.2 Merge location field with custom user field

Discussion in 'XenForo Questions and Support' started by wtgw, Oct 28, 2013.

  1. wtgw

    wtgw Member

    I just imported vbulletin to xenforo. I have 2 location fields, the default xenforo one and a custom user field. I wish to move the default location field to the custom user field and then hide the default location from the profile pages so only 1 "location" shows up.

    The reason I wish to do this is to make location required upon registration.

    Can anyone help with the query to do this?
     
  2. Jeremy

    Jeremy XenForo Moderator Staff Member

    Easiest would be to edit the templates to hide the default location field on the registration and profile templates.
     
  3. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

  4. wtgw

    wtgw Member

    Location field isn't on the registration form right? Is there someway I can change this and make it required? I saw there was an addon for 1.1 but it says it doesn't work for 1.2.
     
  5. vord

    vord Member

    I've done much the same thing. It can be handy to require location on registration as the spammers often lie about their location. I have a little external script where I can track recent registrations and compare actual location with what the spammers wrote.

    My useful information is that if you put location in member info beside posts it doesn't show up if empty. You can put both the normal and custom ones on there and you don't get 2 locations if one is always empty. (Maybe you do if you leave the "Location: " bit in there. I removed that bit from the member info template.

    For me I added a custom field for location and set it to be required in registration. Then removed the standard location edit box in the user profile template. Then messed around in user-info template and removed the "location:" bit from both.

    Result is all good apart from every imported member will need to add their location again when editing their profile, and the nice " member from Porlock" (or wherever location after usernames in some places) will not appear.
     
    Last edited: Nov 12, 2013

Share This Page