XF 1.3 RE: Custom User Fields in Postbit [message_user_info]

JacquiiDesigns

Well-known member
I've created a few custom user fields and have added them to the message_user_info template as to populate the postbit with searchable fields. Here's the result:

bf_message_user_info.webp

The underlined links above are the actual field values. I made all field values lowercase when creating the fields. But what I want to show in the spot here is the actual formfield values:

bf_message_user_info2.webp

bf_message_user_info3.webp

For instance - "tennessee" becomes Tennessee with capitalization intact.
And "postop" becomes Post-op with capitalization and the hyphen intact.

Here's the code I'm currently using in message_user_info

Code:
<xen:if hascontent="true">
            <dl class="pairsJustified userField_surgerylocationstate xbCustomField">
            <xen:contentcheck>
                <xen:if is="{$user.customFields.surgerylocationstate}">
                    <a class="Tooltip concealed" title="Surgery Location" href="members/searchlist?some_field={$user.customFields.surgerylocationstate}&field_type=surgerylocationstate"><dt><i class="fa fa-hospital-o" data-offsetx="-6" data-offsety="0"></i></dt>
                    <dd>{$user.customFields.surgerylocationstate}</dd></a>
                </xen:if>
            </xen:contentcheck>
            </dl>
                            <dl class="clearFix"></dl>
</xen:if>

Can someone please tell me which part of the code above I need to change in order to get the desired effect please? Much appreciation for the assistance!

J
 
I may be missing something, but are you manually editing the template to add the custom fields?

There is an SP which you can check to do that.

upload_2014-10-21_9-39-25.webp

Then you enter the text you want to display in the HTML field.

upload_2014-10-21_9-42-13.webp
 
I may be missing something, but are you manually editing the template to add the custom fields?

There is an SP which you can check to do that.

View attachment 86994

Then you enter the text you want to display in the HTML field.

View attachment 86996
Hey Brogan and thanks for the reply.
I am indeed manually editing the template. The reason is because the default styling/code is a bit different from the layout I'm aiming for.
I think I'm close to achieving the look I want. But this bit of code...

Code:
{$user.customFields.surgerylocationstate}

... only shows the field values.
Is there a code to show the actual formfield -- with spelling, case & capitalization intact -- as it does on say the registration form?

BF-custom-profiel-fields3.gif
 
Try:
Code:
{xen:helper userFieldValue, $userFieldsInfo.fieldName, $user, $user.customFields.fieldName}
Change fieldName in both places as necessary.
BINGO!
That did it. Thanks so much Mike
di-XG8C.gif


J.
 
Top Bottom