XF 1.1 Custom User Fields in XenForo 1.1

One of the most requested features for XenForo 1.1 has been the ability to define custom fields for your users. Here's a first look at the user field system we've built.

To view this content we will need your consent to set third party cookies.
For more detailed information, see our cookies page.
 
Amazing example of what is to come, I can think of some great uses for this...

One question though, is it possible to allow users to define multiple custom options... what I mean is say I do the favourite colour instead of setting a few predefined colours to choose from the user is presented with a text field with the option of adding more text fields???

If this isn't possible by default is the custom userfields options extendible via php callbacks (and not just for validation)?
 
Amazing example of what is to come, I can think of some great uses for this...

One question though, is it possible to allow users to define multiple custom options... what I mean is say I do the favourite colour instead of setting a few predefined colours to choose from the user is presented with a text field with the option of adding more text fields???

If this isn't possible by default is the custom userfields options extendible via php callbacks (and not just for validation)?
That's not possible and would probably need a whole separate field type. It could possibly be extended, but with something like that, you may benefit more from not trying to use a general fields system.
 
That's not possible and would probably need a whole separate field type. It could possibly be extended, but with something like that, you may benefit more from not trying to use a general fields system.

I was hoping the custom profile fields would give the same control that you get when adding options in debug mode, here you can set a PHP callback for the actual field display meaning you can make any number of options possible to the customer...
 
Yes, the importer does its best to convert between the two formats.
Might be too early to ask but how will that go... will an updated vB3 importer create custom fields automatically as needed if it finds any or will we create the XF custom fields first and then map the fields to each other?
 
Maybe I missed it, but if I want the custom fields to show up in the postbit member information, can each of them have their own css styling?
 
Maybe I missed it, but if I want the custom fields to show up in the postbit member information, can each of them have their own css styling?
Yes, each custom field has a unique class name of userField_{$fieldId}.

Screen Shot 2011-10-04 at 16.36.37.webp
 
Can you show us an example of the PHP callback? I realise it's probably the same as every other callback, but I'd like to see it.

Something like "Favourite Forum" with a PHP callback XenForo_Option::renderSelect which allows you to select your favourite forum?
 
Nicely implemented. This is probably obvious to some people, but can we use these to define additional options too? For example in vB we have made one to enable/disable ads on the forum. We use an if statement (if member is of group X and has 'yes' for profile field Y, then disable ads).
 
Fantastic. Must blow the dust off my old vb3 db and extract the custom field data and squirt it in when 1.1 becomes available :)
 
Nicely implemented. This is probably obvious to some people, but can we use these to define additional options too? For example in vB we have made one to enable/disable ads on the forum. We use an if statement (if member is of group X and has 'yes' for profile field Y, then disable ads).
You can put them on the preferences page and access the value via {$visitor.customFields.yourFieldNameHere}.
 
great job guys!

having those great tools for creating profile-fields, I am wondering if this would allow to create something like this ?
Many thanks!

profile_fields_question.gif
 
Ok, great ! :)

But it will be cool to have the option to put an image or icon instead of text.
for exemple : what is your favorite drink ? beer, coca... it will display an icon,
like that :

cfields.webp


I had this on vB, I would like to have it on xenforo.
 
Top Bottom