MyBB Community Forums
Custom Profile Fields - Printable Version

+- MyBB Community Forums (https://community.mybb.com)
+-- Forum: 1.8 Support (https://community.mybb.com/forum-175.html)
+--- Forum: General Support (https://community.mybb.com/forum-176.html)
+--- Thread: Custom Profile Fields (/thread-162973.html)



Custom Profile Fields - Ben - 2014-11-18

Hi there,

I've added some custom profile fields in the administration panel and added them into the post bit individually. However, if the profile field is not filled in it still displays in the post bit.

For example

Motto: customfielddata

I would only like it to show the above if the field is filled in.


RE: Custom Profile Fields - Cleopatra - 2014-11-18

can you explain more
or add a screeshot


RE: Custom Profile Fields - mmadhankumar - 2014-11-18

first you need the PHP in Templates plugin... after activating the plugin, use a if conditional to display the profile fields...

<if !empty($post['fidX']) then>
Field Title: {$post['fidX']}
</if>

replace X with the value of your custom profile fields...


RE: Custom Profile Fields - Ben - 2014-11-18

Thank you very much.