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?