Custom field that behaves like a tag field?

Is there a way to create a custom field for tags? Kinda like a ‘Select - Multiple’ field, but without having to define the options in advance. How do tag fields work anyway?

I am looking for a solution to track event attendees. I would have one field ‘attendee’ in the contact object and then I want to be able to just add event codes as tags from event registration forms via the API etc.

What field type is the built-in ‘tags’ field? I guess the tags field in mysql is lead_tags, which is a table consisting of an ‘id’ field, type int(11) AUTO_INCREMENT, and then a ‘tag’ field, varchar(255).

And then there is a key lead_tag_search and that is connected in some way to the contact? Can’t wrap my head around it…

Can I leverage this lead_tags table in some way to create a custom tags field?

Or can I store tags as an array in a regular custom text field? Apparently you can convert and store an array as a flat string, using json_encode() , implode() , or serialize().

Could I add and remove tags with that approach, via the API? I could just use custom PHP to edit/search/add the $customtags array I guess. But Mautic front end would probably not be able to display $customtags…

Is there a recommended, Mautic-native method?

I am also interested in knowing how to do this because I am uploading a list of Twitter Profiles associated with a user that “retweeted” a Twitter Profile and doing data analysis on this information based on other users to create segments. I want it in a custom “tag” field called Twitter Retweets though - There must be a way just to clone the tag field and have it as another field! Did you figure out how to do this @modifiedcontent ?

1 Like

Also following this thread!

1 Like

I have not made any progress with this; waiting for feedback from developers.