Re: setting <input> checked

Bill Moseley <[email protected]> Fri, 5 Dec 2014 17:03:07 -0800
Newsgroups gmane.comp.lang.perl.modules.template-toolkit
Message-ID <CAKhN_m6=JOv4J91Ykp=i3yyAY-uOzPQk7axRx5Eg38986PyJAA@mail.gmail.com>
--===============0318069591347778883==
Content-Type: multipart/alternative; boundary=001a11c2c6bc710036050981c37c

--001a11c2c6bc710036050981c37c
Content-Type: text/plain; charset=UTF-8

On Fri, Dec 5, 2014 at 6:38 AM, Bill McCormick <[email protected]>
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
<http://search.cpan.org/dist/Template-Plugin-FillInForm/>.



> 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 wrong.
>
> Suggestions?
>
> Thanks,
>
> Bill
>
>
> _______________________________________________
> templates mailing list
> [email protected]
> http://mail.template-toolkit.org/mailman/listinfo/templates
>
>


-- 
Bill Moseley
[email protected]

--001a11c2c6bc710036050981c37c
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><br><div class=3D"gmail_extra"><br><div class=3D"gmail_quo=
te">On Fri, Dec 5, 2014 at 6:38 AM, Bill McCormick <span dir=3D"ltr">&lt;<a=
 href=3D"mailto:[email protected]" target=3D"_blank">wpmccormick@gmail.=
com</a>&gt;</span> wrote:<br><blockquote class=3D"gmail_quote" style=3D"mar=
gin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,2=
04);border-left-style:solid;padding-left:1ex"><div dir=3D"ltr"><div><div><d=
iv><div>I&#39;m trying to find a slick way to make my radio buttons checked=
.</div></div></div></div></div></blockquote><div><br></div><div>For another=
 slick approach take a look at=C2=A0<a href=3D"http://search.cpan.org/dist/=
HTML-FillInForm/">HTML::FillInForm</a>=C2=A0and the <a href=3D"http://searc=
h.cpan.org/dist/Template-Plugin-FillInForm/">filter</a>.</div><div><br></di=
v><div>=C2=A0</div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0p=
x 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border=
-left-style:solid;padding-left:1ex"><div dir=3D"ltr"><div><div><div><div> D=
oing something like ...<br><br>[% IF flags &amp;&amp; 16 %]<br>=C2=A0 &lt;i=
nput class=3D&quot;radio&quot; type=3D&quot;radio&quot; name=3D&quot;recipe=
_type&quot; value=3D&quot;Warmup&quot; checked=3D&quot;1&quot; /&gt;Warmup<=
br>[% ELSE %]<br>=C2=A0 &lt;input class=3D&quot;radio&quot; type=3D&quot;ra=
dio&quot; name=3D&quot;recipe_type&quot; value=3D&quot;Warmup&quot; /&gt;Wa=
rmup<br>[% END %]<br><br></div>... just seems wrong.<br><br></div>Suggestio=
ns?<br><br></div>Thanks,<br><br></div>Bill<br><div><div><div><div><br></div=
></div></div></div></div>
<br>_______________________________________________<br>
templates mailing list<br>
<a href=3D"mailto:[email protected]">templates@template-toolki=
t.org</a><br>
<a href=3D"http://mail.template-toolkit.org/mailman/listinfo/templates" tar=
get=3D"_blank">http://mail.template-toolkit.org/mailman/listinfo/templates<=
/a><br>
<br></blockquote></div><br><br clear=3D"all"><div><br></div>-- <br><div cla=
ss=3D"gmail_signature">Bill Moseley<br><a href=3D"mailto:[email protected]" =
target=3D"_blank">[email protected]</a></div>
</div></div>

--001a11c2c6bc710036050981c37c--


--===============0318069591347778883==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
templates mailing list
[email protected]
http://mail.template-toolkit.org/mailman/listinfo/templates

--===============0318069591347778883==--