Re: [htmltmpl] RFC: Conditional TMPL_INCLUDE

2005-01-10 Thread Mathew Robertson
> > although I wouldn't consider some of the enhancements "feature > > creep" (ie I think not having TMPL_ELSIF would mean that a feature > > is missing) -> I thank him for producing a very use piece of code. > > Thanks, I appreciate that. I'm certainly not above changing my mind > if enough peop

Re: [htmltmpl] RFC: Conditional TMPL_INCLUDE

2005-01-10 Thread Sam Tregar
On Tue, 11 Jan 2005, Mathew Robertson wrote: > I respect Sam's opinion on what should and shouldn't go into H::T, > although I wouldn't consider some of the enhancements "feature > creep" (ie I think not having TMPL_ELSIF would mean that a feature > is missing) -> I thank him for producing a very

Re: [htmltmpl] Select/option lists (how to generate)

2005-01-10 Thread Mark A. Fuller
From: Philip Tellis <[EMAIL PROTECTED]> > >I do it by pushing the selected evaluation right to the SQL: > >SELECT foo, bar, baz, IF(bar='myval', 'selected', '') AS selected FROM >... > >and then just throw it into an arrayref. That's the nifty SQL I mentioned seeing before. It was posted by Punee

Re: [htmltmpl] RFC: Conditional TMPL_INCLUDE

2005-01-10 Thread Mathew Robertson
I respect Sam's opinion on what should and shouldn't go into H::T, although I wouldn't consider some of the enhancements "feature creep" (ie I think not having TMPL_ELSIF would mean that a feature is missing) -> I thank him for producing a very use piece of code. And these enhancements show t

Re: [htmltmpl] Using HTML::Template to prefill in values

2005-01-10 Thread Clifton Royston
On Mon, Jan 10, 2005 at 06:33:54PM +1100, Michael Kraus wrote: > I'm curious about using HTML::Template to pre-fill in form field values. ... > > What I'm currently using is this method > > > value=""> > > This works great for filling in text boxes. However, how can this be > done for select bo

Re: [htmltmpl] Select/option lists (how to generate)

2005-01-10 Thread Philip Tellis
Sometime on Jan 10, Mark A. Fuller assembled some asciibets to say: # %db_vals is automatically populated because the prepared statement # has "bind_col" each column to a $db_vals{key}. if ($db_vals{code} eq $selected_value) { $sel = ' selected="selected"'; } I do it by pushi

[htmltmpl] Select/option lists (how to generate)

2005-01-10 Thread Mark A. Fuller
>What I'm currently using is this method > > > value=""> I don't believe you need the conditional. You can let "my_input_box_value" evaluate always. If it contains nothing, it will evaluate to nothing. Your template won't be as cluttered. >However, how can this be done for select boxes (drop-

Re: [htmltmpl] Using HTML::Template to prefill in values

2005-01-10 Thread Carl Franks
Micheal, You've got the right idea there, that's generally how it's done and yes, it's a bit of a pain. One other option is to fill the template without the form selections, then use HTML::FillInForm to set the form parameters. Another option if you're just dealing with date / time select menus

Re: [htmltmpl] Using HTML::Template to prefill in values

2005-01-10 Thread Daniel Axtell
On Monday 10 January 2005 2:33 am, Michael Kraus wrote: > G'day all... > > I'm curious about using HTML::Template to pre-fill in form field values. > > What I'm currently using is this method > > > value=""> > > This works great for filling in text boxes. However, how can this be > done for select