Format data in a message [message #2024] |
Wed, 29 April 2009 12:43 |
gpatti
Messages: 283 Registered: August 2008
|
Senior Member |
|
|
Tony,
I have placed some code in the _cm_post_insertRecord method of a class which generates different $this->messages[] depending on the outcome of additional processing following an insert.
The messages include certain fields from the database, including dates. However, I don't seem able to format the dates in the message, or use lookup values. I think the formatting is removed for the DB operations. Is it possible to apply formatting again from within this, and other similar, methods?
Graham
|
|
|
|
|
|
|
Re: Format data in a message [message #2031 is a reply to message #2030] |
Wed, 29 April 2009 19:32 |
AJM
Messages: 2371 Registered: April 2006 Location: Surrey, UK
|
Senior Member |
|
|
Take a look at the formatData() method inside 'std.table.class.inc' for examples of the standard formatting code for dates and numbers. The values for option lists are manipulated in the XSL transformation, so there is no PHP code. You will have to use something like:
$string = $this->lookup_data['optionlist']['key'];
Tony Marston
http://www.tonymarston.net
http://www.radicore.org
|
|
|