Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Re: [TB2] Autofilling leading zeros?

Quote Reply
Re: [TB2] Autofilling leading zeros? In reply to
Hi,

Use a global. If your field is called 'Foo', use:

leadingzero_foo =>
Code:
sub { return sprintf ("%05d", $_[0]->{Foo}); }

and then just use <%leadingzero_foo%> in your template.

Cheers,

Alex
--
Gossamer Threads Inc.
Subject Author Views Date
Thread Autofilling leading zeros? TB2 1276 Oct 22, 2001, 5:08 PM
Post Re: [TB2] Autofilling leading zeros?
Alex 1217 Oct 22, 2001, 5:33 PM