[pmwiki-devel] Changing PTV before being populated in PmForm
DaveG
pmwiki at solidgone.com
Thu Jan 8 20:00:55 CST 2009
I have dates stored as Unix timestamps. I'd like to display the date in
some other format. Is there a way to access, and change a PTV as it gets
displayed on a PmForm?
Some things I've tried:
1] Using markup expressions in the PmForm form defintion. I don't seem
to be able to reference the PTV at this point though (I've tried
{$$ptv_varname}, {$:varname}):
(:input pmform target="my target":)
(:input default source="{*$FullName}":)
(:input default request=1:)
(:input default $:entrydate "{(ftime fmt="%d-%m-%Y %H:%M"
@{$$ptv_entrydate} )}":)
(:input end:)
2] Defining a markup to alter the format. The markup fires, and
according to action=ruleset, executes before PmForms, but the original
Unix date is displayed.
Markup('entrydate', 'fulltext',
'/\(:entrydate:([0-9]+):\)/e',
"'(:entrydate:'.strftime('%d-%m-%Y %H:%M', $1).':)'");
~ ~ Dave
More information about the pmwiki-devel
mailing list