Re: [Templates] setting input checked

2014-12-07 Thread Kiss Gabor (Bitman)
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:

Re: [Templates] setting input checked

2014-12-05 Thread Khalid Akram
Try: input class=radio type=radio name=recipe_type value=Warmup [% IF flags 16 %]checked=1[% END %] /Warmup From: Bill McCormick wpmccorm...@gmail.commailto:wpmccorm...@gmail.com Date: Fri, 5 Dec 2014 08:38:35 -0600 To: templates@template-toolkit.orgmailto:templates@template-toolkit.org

Re: [Templates] setting input checked

2014-12-05 Thread Khalid Akram
Even better would be: input class=radio type=radio name=recipe_type value=Warmup [% IF flags 16 %]checked=“checked[% END %] /Warmup From: Bill McCormick wpmccorm...@gmail.commailto:wpmccorm...@gmail.com Date: Fri, 5 Dec 2014 08:38:35 -0600 To:

Re: [Templates] setting input checked

2014-12-05 Thread Bill McCormick
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

Re: [Templates] setting input 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: 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

Re: [Templates] setting input 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 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,

Re: [Templates] setting input checked

2014-12-05 Thread Bill Moseley
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