[pmwiki-users] fox: summ fields

Hans design5 at softflow.co.uk
Mon Jun 9 06:54:03 CDT 2008

Sunday, June 8, 2008, 5:32:27 PM, noskule wrote:

> What's the best way to sum fields together?
>     [input publish-date] [input publish-hours] [input publish-minutes]

> I would like to sum the tree fields together and save it as "publish-date".

> Theoretically  I could do it with a foxfilter, but I don't want to store
> the "hours" and "minute" values.

if you just want to string-together the input value strings into one
output string (i.e. no conversion to a unix time stamp), you could
try in the form:

(:input text publish_date:)
(:input text publish_hours:)
(:input text publish_minutes:)
(:input hidden publish_long_date "{$$publish_date} {$$publish_hours}:{$$publish_minutes}":)

and use {$$publish_long_date} in your template.

Or use the three components separately in your template, like I've
done in the hidden input field.


More information about the pmwiki-users mailing list