Custom tags not working correctly in subject lines

Hi, i'm having an issue with custom tags. I want to create a custom tag to randomise certain phrases, i know it's possible with the random content tag but its very messy if i want to randomise like 50 phrases.

The custom tag actually works in the subject line, however its not rendering properly as its showing the <br /> tag after the tag as shown below screenshot

1631007335077.png

Here below screenshot is the custom tag i created

1631007483241.png

1631007501561.png

Is there anything i can do to stop the <br /> rendering in the subject line? I did try playing around with the HTML but it keeps defaulting back to the < br /> tag.
 
Hi @twisted1919 i noticed the [DATE] tag is not working in subject lines. It works in the email body, just not subject lines.
In subject line will work only tags which appear if you click on [Available Tags].
 
MW team, could you therefore pls add [CURRENT_DATE] to the available tags pulldown in the campaign settings? Just so my clients have the option to use it without asking. Many thanks!

Is there also a chance to re-format the date to display correctly in a European readable format = DD/MM/YY? The US format makes no sense to us here.
 
Last edited:
could you therefore pls add [CURRENT_DATE] to the available tags pulldown in the campaign settings?
Sure.

Is there also a chance to re-format the date to display correctly in a European readable format = DD/MM/YY? The US format makes no sense to us here.
Since
[CURRENT_YEAR] [CURRENT_MONTH] [CURRENT_DAY] are also available, could you use them to format your own date?
Otherwise, I can only assume we can extend the CURRENT_DATE tag to allow a format, so you could do something like:
[CURRENT_DATE format="d.m.Y"] but this can get a bit more complex, so I am not sure if it would be a good idea.
 
I can live w/your first suggestion for now, but having more display options would be a great idea - maybe per list or client where define the [CURRENT_DATE] format on a customer or list level.
 
This is turning into a real obstacle now.
Almost all of our data feeds are generating a timestamp in the yyyy-mm-dd hh:mm format, and that keeps clashing with the MailWizz timestamp, which we cannot change. :confused:
 
In custom field doesn't work.
Yes, so that's my whole point.
When we import data 9 times out of 10, the date is using a more common ISO format (yyyy-mm-dd hh:mm), so the data never matches with existing MailWizz entries. The far easier solution for us would be to change the custom field date format in MailWizz, or for MailWizz to convert imported dates automatically into its preferred format.
 
I was wondering if a more flexible date format, as suggested above, to allow [CURRENT_DATE format="d M, Y"] using the ISO method, has been or can be implemented. We have so many use cases for this, from event management, to subject line population etc.
It would be amazing to have more options here.
 
It's just an idea for now, but I think custom field types should contain some "normalisers" so that when data is added/updated for a field, that data should go through the normaliser to make sure it has the right format, etc.
In the case of the date, it would try to parse the date into a standard date format, then the date/datetime fields themselves would have an option for format so that you select the way that data is formatted for display only, so you'd have:
Code:
When incoming data:
external data -> normaliser -> data goes to database normalised.
i.e:
2023, March 07 -> normaliser -> 2023-03-07

When outgoing data:
database data -> formatter -> display data
i.e:
2023-03-07 -> formatter (field specific format options) -> 07 March, 2023
This would bring so much to the table, I think.
@nadworks - do you see any issue with this approach?
@ghimes - you?

The only issue, I don't know exactly how this should be implemented in a way it won't mess things up, so it will require some planning and quite some work to get it right.
 
Just to add to this, each field type has it's own validation rules, so bad data won't go through now. We just need to model that data before it reaches validation for example.
 
Have you been able to get a European date format or some sort of formatting yet?

I also have another question.

Is it possible to create a custom TAG for example:

[CUSTOM_TEXT='folder1/text1.txt']

Which will work on the principle that the TAG will be replaced by
the text placed in a specific file named (text1.txt), which is located in a folder (folder1).


Alternatively, is there any way to create such a solution in PHP, or how to go about it?
What I mean is that I can, using PHP, change this content outside of MailWizz

Thanks

edit...

I noticed that there is a solution that will replace what I need,

[REMOTE_CONTENT url='https://www.google.com/']

so I will test, you can no longer respond to this thread.
 
Last edited:
Back
Top