Custom field output control
When you create custom fields on your forum they are output with a label and the value in plain text. To use a couple of default fields available out of the box as an example, they would look like this:
You can get a little bit more creative by modifying the "Value display HTML" which allows you to modify the
value portion of the custom field output:
In this example we're allowing the field value to actually link to the person's social media profiles rather than just listing their usernames and we're also adding a little bit of visual flair by displaying a Font Awesome icon:
Now, this is better but we felt there was some room for improvement so now we enable you to adjust the entire wrapper for the custom field. In this particular example, the icons are... um... iconic enough so the labels denoting "Facebook" and "Twitter" respectively seem somewhat superfluous.
We've already customised the value portion to look how we want it to, so we now just modify the wrapper portion and have that reference the existing value:
Notice that the wrapper HTML doesn't include the
{$title}
or any of the usual
formRow
markup. Instead we have a very simple wrapper around the linked icons (the value). With a small adjustment to the size of the icons we're sure you'll agree this looks much better.
The possibilities you have for customising the look of custom fields are now somewhat endless so we're looking forward to seeing what you come up with.
Of course this feature comes with the custom field framework as standard so it should be very simple for existing custom field implementations to start supporting this and giving custom fields a new lease of life in XenForo 2.2!