XF 2.2 Hide Custom Thread Field

Solution
There is another way also.

You have the option of three places to display the custom field:

  • Before Message
  • After message
  • Thread Status block

If you intend to never use any one of these positions, you can just hide that specific position.

So for example I never use the After message position. Any fields I don't want displayed I use that, and then the one piece of code covers them all:

Code:
.message-fields--after

{display:none}

Mr Lucky

Well-known member
Find the Field id for that field and add this to your style's extra.less template (change id to the actual id)

Code:
[data-field="id"]
{display:none!important}
 
Last edited:

Mr Lucky

Well-known member
There is another way also.

You have the option of three places to display the custom field:

  • Before Message
  • After message
  • Thread Status block

If you intend to never use any one of these positions, you can just hide that specific position.

So for example I never use the After message position. Any fields I don't want displayed I use that, and then the one piece of code covers them all:

Code:
.message-fields--after

{display:none}
 
Last edited:
Solution

PASS

Well-known member
Find the Field id for that field and add this to your style's extra.less template (change id to the actual id)

Code:
[data-field="id"]
{display:none!important}

This works great. Thank you!

Is there a conditional I can use for that field in the template (post_macros & thread_view) so it doesn't show in the page source?

You have the option of three places to display the custom filed.

  • Before Message
  • After message
  • Thread Status block

We need a 4th option, Do Not Show. ;)
 
Top