Why?
I needed an alert field for certain customers. The first part: alter table customer_company to add the field I needed. Up to you to do this. Backup, test, your data is your responsibility, but
Code: Select all
alter table customer_company add my_alert_message varchar(200) NULL ;
And then in the CustomerCompany Map in the order you want it displayed:
Code: Select all
[ 'CustomerCompanyAlertMessage', 'Alert Message', 'my_alert_message', 1, 0, 'var', '"></a><span style="color:red">[% Data.CustomerCompanyAlertMessage %]</span><a style="display:none" href="', 0 ],
"> closes the href markup for the URL
</a> closes the obligatory anchor markup because it's a URL
<span style="color:red"> does what you think.
[% Data.CustomerCompanyAlertMessage %] makes sure the message isn't collapsed (...)
</span> closes red
<a style="display:none" href=" pretends to be the opening anchor (a) markup again, which by default makes a hyperlink/duplicates the text. So display:none hides it.
What's great about this is it's relatively easy and painless (?) to integrate markup without changing code.