Menu

#4 Add support to evaluated values

open
nobody
Plugin (5)
5
2008-11-13
2008-11-13
No

Adding support for <value> tag of type 'eval', that will allow to execute PHP code that return the value.

Useful for example to compute default value for date field that is in a given format and that need to be a given date (the last day for example):
Example:

<variable name='date'>
<description>A date field in format 'DD/MM/YYYY' that default to the date of yesterday</description>
<value type='eval'>
return date("d/m/Y",time()-8*24*60*60);
</value>
<format type='date'>
<param name='format'>%d/%m/%Y</param>
</format>
</variable>

Discussion


Log in to post a comment.