TMPL_IF
Status: Beta
Brought to you by:
tinita
Hi
I loop through a list of dropdown values and want ti add "selected" at the right value. Till now I do it as follows:
<TMPL_EACH dropdowns.serverType>
<option value="<TMPL_VAR __key__>" <%perl my $v = __ROOT__->{srvPup}->{srvType}; __OUT__ "selected" if(defined($v) && $__key__ eq $v);%>>
<TMPL_VAR __value__>
</option>
Do you know a better way? It would be great to be able to compare two values in the HTML_IF tag, wouldn't it?
Thanks,
joschi