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

XF 1.4 Assign title to users with custom fields

Discussion in 'XenForo Questions and Support' started by JackieChun, Jun 27, 2015.

  1. JackieChun

    JackieChun Active Member

    Is it possible to automatically assign a custom title to users who choose to fill out a custom field during registration?

    For example, you ask them during registration "Please list your car model, if you own one." If they leave that field blank, they get the usual title. If they fill it out with a value, they get a "Driver" title assigned to them, or perhaps even get moved to the "Drivers" user group.

    Possible?
     
  2. Brogan

    Brogan XenForo Moderator Staff Member

    Create a user group promotion based on the custom user field.
     
    JackieChun likes this.
  3. JackieChun

    JackieChun Active Member

    Cool. Is that the best way to do it if you just want it to be a vanity title, without any special permissions? My concern is that creating a new group means yet another set of privileges to maintain. Even if I clone regular permissions now, if those regular permissions change in the future, I would have to do it for both the Registered group and this custom group now.
     
  4. Brogan

    Brogan XenForo Moderator Staff Member

    You don't have to clone or set any permissions.

    Permissions are cumulative across user groups.

    See the guide in my signature.
     
  5. JackieChun

    JackieChun Active Member

    I've gone through all the steps in your guide and am now at this point:

    [​IMG]

    The promotion works fine if it catches a special word. But I need it catch presence of a value. If there's nothing, no promotion. If there's something, promotion.
     
    Last edited: Jun 29, 2015
  6. JackieChun

    JackieChun Active Member

    Tried this, no result:

    Code:
    ^[a-zA-Z]+$
     
  7. Brogan

    Brogan XenForo Moderator Staff Member

    You can't use regex there.

    I don't believe it's possible to check for the existence of any text, just specific strings.
     
  8. JackieChun

    JackieChun Active Member

    That really sucks!

    Don't laugh at me, but could I create 26 promotions, one for every letter of the alphabet to catch all words? Or if it's case sensitive (I hope not), 48 52 (wow, I am tired) promotions?
     

Share This Page