You'll need to undef autoEscape if you want this to work here, otherwise the labels will be the actual HTML generated by the a() method.
You'll also need to import the autoEscape method, by addingautoEscape(undef); print radio_group (-name => "item", -value => ["B","T","S","M"], -labels => { 'B' => 'Item '.a({-href=>"/help/b.html"},"B").' + ($10)', 'T' => 'Item .a({-href=>"/help/b.html"},"T").' +($50)', 'S' => 'Item .a({-href=>"/help/b.html"},"S").' +($200)', 'M' => 'Item .a({-href=>"/help/b.html"},"M").' +($500)' }, -linebreak => 1); autoEscape(1);
use CGI qw/:standard autoEscape/;
Maybe there's a more elegant way to do this? Anyone?
Update: Fixed syntax errors I cut-and-copied. . .
-Any sufficiently advanced technology is
indistinguishable from doubletalk.
In reply to Re: Re: Creating HREF links on radio group items
by Hero Zzyzzx
in thread Creating HREF links on radio group items
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |