[Templates] setting checked

2014-12-05 Thread Bill McCormick
I'm trying to find a slick way to make my radio buttons checked. Doing something like ... [% IF flags && 16 %] Warmup [% ELSE %] Warmup [% END %] ... just seems wrong. Suggestions? Thanks, Bill ___ templates mailing list templates@template-toolki

Re: [Templates] setting checked

2014-12-05 Thread Khalid Akram
Try: Warmup From: Bill McCormick mailto:wpmccorm...@gmail.com>> Date: Fri, 5 Dec 2014 08:38:35 -0600 To: mailto:templates@template-toolkit.org>> Subject: [Templates] setting checked [% IF flags && 16 %] Warmup [% ELSE %] Warmup [% END %] This e-mail has been scanned for all viruses by

Re: [Templates] setting checked

2014-12-05 Thread Khalid Akram
Even better would be: Warmup From: Bill McCormick mailto:wpmccorm...@gmail.com>> Date: Fri, 5 Dec 2014 08:38:35 -0600 To: mailto:templates@template-toolkit.org>> Subject: [Templates] setting checked [% IF flags && 16 %] Warmup [% ELSE %] Warmup [% END %] This e-mail has been scanned for

Re: [Templates] setting checked

2014-12-05 Thread Bill McCormick
okay, so now the bitwise *and *is giving me problems: Warmup incorrectly (I think) turns into Warmup 15 = 16 = 0001 last time I checked, 15 & 16 = 0 Adding parenthesis didn't help either: [% 'checked="1"' IF (15 && 16) %] Also, is there some way TT can interpret numbers as hex

Re: [Templates] setting checked

2014-12-05 Thread Larry Leszczynski
Hi Bill - On Fri, Dec 5, 2014, at 09:56 AM, Bill McCormick wrote: > okay, so now the bitwise *and* is giving me problems: > > 'checked="1"' IF 15 && 16 %]/>Warmup You're doing logical AND, not bitwise AND. You want "15 & 16". Larry ___ templates ma

Re: [Templates] setting checked

2014-12-05 Thread Larry Leszczynski
Actually, that probably only works in a [% PERL %] block... On Fri, Dec 5, 2014, at 10:00 AM, Larry Leszczynski wrote: > Hi Bill - > > On Fri, Dec 5, 2014, at 09:56 AM, Bill McCormick wrote: > > okay, so now the bitwise *and* is giving me problems: > > > > > 'checked="1"' IF 15 && 16 %]/>Warmup

Re: [Templates] setting checked

2014-12-05 Thread Bill McCormick
Yea, I had already tried the single & and it does not work. On Fri, Dec 5, 2014 at 11:01 AM, Larry Leszczynski wrote: > Actually, that probably only works in a [% PERL %] block... > > On Fri, Dec 5, 2014, at 10:00 AM, Larry Leszczynski wrote: > > Hi Bill - > > > > On Fri, Dec 5, 2014, at 09:56 A

Re: [Templates] setting checked

2014-12-05 Thread Bill Moseley
On Fri, Dec 5, 2014 at 6:38 AM, Bill McCormick wrote: > I'm trying to find a slick way to make my radio buttons checked. > For another slick approach take a look at HTML::FillInForm and the filter