XF 2.2 Moving a custom user field to the top, under profile banner

Custom user fields are displayed using a loop so you can't just move the code in the template as all fields will show in that new location.

You can though display a custom user field using this: {$user.Profile.custom_fields.name-of-field}.
 
Custom user fields are displayed using a loop so you can't just move the code in the template as all fields will show in that new location.

You can though display a custom user field using this: {$user.Profile.custom_fields.name-of-field}.
I've placed that under the profile banner in account_details but the form isn't showing. I have change the "name-of-field" to the Field ID of the custom user field.
 
Code:
<xf:textboxrow name="custom_fields[postbit_cover]" value="{$user.Profile.custom_fields.postbit_cover}" />

Tried this and shows a form but putting a value in doesn't save when I hit save. I was thinking if I do that, I can then remove the other form via css? Would that be the best approach?
 
If it's on the member's own account page, dump the vars to see what the format is for that template -- {{dump (vars()) }} -- it's probably {$xf.visitor.Profile.custom_fields.name-of-field}.
 
If it's on the member's own account page, dump the vars to see what the format is for that template -- {{dump (vars()) }} -- it's probably {$xf.visitor.Profile.custom_fields.name-of-field}.
Is this to display the custom field or the form for the field? As it doesn't seem to work.
 
It wasn't clear what you were asking for - that code is to display the contents of the custom field.

If you want to move the actual input then it's going to require some work to replicate the functionality of the custom_fields_macros template while at the same time preventing that field from being displayed by that template.
 
It wasn't clear what you were asking for - that code is to display the contents of the custom field.

If you want to move the actual input then it's going to require some work to replicate the functionality of the custom_fields_macros template while at the same time preventing that field from being displayed by that template.

Ok, thank you so much for clarifying that!
 
Back
Top Bottom