Yea, I had already tried the single and it does not work.
Unfortunately there are no arithmetic and bitwise operators in TT.
But in theory the problem can be solved with comparisons only. :-)
Let's assume that flags can be at most 255. Then this logical expression
is equal to flags0x08:
I'm trying to find a slick way to make my radio buttons checked. Doing
something like ...
[% IF flags 16 %]
input class=radio type=radio name=recipe_type value=Warmup
checked=1 /Warmup
[% ELSE %]
input class=radio type=radio name=recipe_type value=Warmup
/Warmup
[% END %]
... just seems
Subject: [Templates] setting input checked
[% IF flags 16 %]
input class=radio type=radio name=recipe_type value=Warmup
checked=1 /Warmup
[% ELSE %]
input class=radio type=radio name=recipe_type value=Warmup /Warmup
[% END %]
This e-mail has been scanned for all viruses by Star
@template-toolkit.org
Subject: [Templates] setting input checked
[% IF flags 16 %]
input class=radio type=radio name=recipe_type value=Warmup
checked=1 /Warmup
[% ELSE %]
input class=radio type=radio name=recipe_type value=Warmup /Warmup
[% END %]
This e-mail has been scanned for all viruses
okay, so now the bitwise *and *is giving me problems:
input class=radio type=radio name=recipe_type value=Warmup [%
'checked=1' IF 15 16 %]/Warmup
incorrectly (I think) turns into
input class=radio type=radio name=recipe_type value=Warmup
checked=1/Warmup
15 =
16 = 0001
last
Hi Bill -
On Fri, Dec 5, 2014, at 09:56 AM, Bill McCormick wrote:
okay, so now the bitwise *and* is giving me problems:
input class=radio type=radio name=recipe_type value=Warmup [%
'checked=1' IF 15 16 %]/Warmup
You're doing logical AND, not bitwise AND. You want 15 16.
Larry
Yea, I had already tried the single and it does not work.
On Fri, Dec 5, 2014 at 11:01 AM, Larry Leszczynski lar...@emailplus.org
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,
On Fri, Dec 5, 2014 at 6:38 AM, Bill McCormick wpmccorm...@gmail.com
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
http://search.cpan.org/dist/HTML-FillInForm/ and the filter