Re: [htmltmpl] H::T filters

2004-02-11 Thread Mathew Robertson
> --Use of $_ should be avoided in modules. It's easy to screw up the > localization and clobber existing values of $_ in code higher up. This can > be solved either by using a regular variable, or by explicitly localizing it. done > --When you create the string used to match tags, it will be

Re: [htmltmpl] Radio button question

2004-02-11 Thread Jason Purdy
"> "> But the above is really ugly, and I gotta believe there's a better approach (that I'm too dense to recognize) Yeah, I know, it seems like there should be a better solution. In fact, due to the limitations of HTML, there are only a series of equally sucky solutions. What you have above i

Re: [htmltmpl] Radio button question

2004-02-11 Thread Keith Jackson
The easiest way (and I'm sure others will recommend this too) is to use HTML::FillInForm. The next best way (IMHO) is to do a simple variation of your second method: perl: $tmpl->param( $q->param('Color')."_Checked" => "checked"); template: "> "> On Wed, 2004-02-11 at 10:32, C Hagstrom wrot

Re: [htmltmpl] Radio button question

2004-02-11 Thread Cees Hek
C Hagstrom wrote: I'm wondering if I'm missing something simple here . I've got things working with a pretty cludgy looking work around: In the programming: ##CH likely a better way to do this if ($q->param('Color') eq 'Red') { $q->param('Red','checked') }; if ($q->param('Color'

Re: [htmltmpl] Radio button question

2004-02-11 Thread Bill Moseley
On Wed, Feb 11, 2004 at 10:32:49AM -0500, C Hagstrom wrote: > My question has to do with radio buttons, > and any recommended ways of carrying > a checked value through successive forms. Are you talking about "sticky" forms? > I have my forms set up so submission errors > (a missing required fie

Re: [htmltmpl] Radio button question

2004-02-11 Thread Timm Murray
At 10:32 AM 2/11/04 -0500, C Hagstrom wrote: <> And in the template: "> "> But the above is really ugly, and I gotta believe there's a better approach (that I'm too dense to recognize) Yeah, I know, it seems like there should be a better solution. In fact, due to the limitations of HTML, there a

[htmltmpl] Radio button question

2004-02-11 Thread C Hagstrom
I'm a newbie to HTML::Template, and this is my first post to the list My question has to do with radio buttons, and any recommended ways of carrying a checked value through successive forms. I have my forms set up so submission errors (a missing required field, for example) are "carried throug

Re: [htmltmpl] H::T filters

2004-02-11 Thread Timm Murray
At 09:50 AM 2/11/04 +1100, Mathew Robertson wrote: Hi list, A little while ago, I asked people for implementations of various filters that are used, so that we could create a module which contains generic filters. Well here it is Attached is a module which implements some generic filters.

Re: [htmltmpl] Nested loop puzzle - variable columns and rows

2004-02-11 Thread Puneet Kishor
On Feb 11, 2004, at 7:08 AM, LDT wrote: I'm a little stumped on how best to approach a particular problem.  I have a report I'm building that will span an uncertain number of columns and uncertain number of rows.  Below is a sample of what the report might look like: Account   Descr   Jan   Fe

Re: [htmltmpl] Nested loop puzzle - variable columns and rows

2004-02-11 Thread Roger Burton West
On Wed, Feb 11, 2004 at 05:08:04AM -0800, LDT wrote: >The question is: how do I create my hash references to push into my loop in the >correct order so that when I loop through my template, it all appears in the correct >column? I've been able to successfully loop through a structure that has f

[htmltmpl] Nested loop puzzle - variable columns and rows

2004-02-11 Thread LDT
I'm a little stumped on how best to approach a particular problem.  I have a report I'm building that will span an uncertain number of columns and uncertain number of rows.  Below is a sample of what the report might look like:   Account   Descr   Jan   Feb   Jun   Aug   Nov Total 51112 Fr