damon_williams
11 years agoGuide
Auto-tag posts in a specific board
We want every new topic in a specific board to automatically get a specific tag, and/or have the 'tags' field pre-populated on the new message page. Is this possible?
Hi,
Both is possible, yes.
- For the server side automatic tag addition on message creation you might look at subscribing to the "MessageCreate" event and then accessing a custom Community endpoint to add the tag to the newly created message.
- The client side JavaScript tag prepopulation is probably easier though by just adding a custom component to the PostMessage page that just adds the tag of your liking in the tag entry field:
$(document).ready(function() { $('#lia-body #lia-tags').val("MyTag"); }
You might want to check if the message to be posted is a new topic or a reply.