package II3562149e53818b6637b38680e87ba918::radio3opt; use strict; use Zen::PerlHandler; sub get { my ($form, $f) = @_; my ($title1, $title2, $title3) = split ',', Zen::PerlHandler->getStatList, 3; my $name = $form->pfx . $f; my $value = $form->getDecorated->{$f}; my %sel; $sel{  length($value) ? $value : 'E' } = 'checked'; my $code = qq(<div class="custom-control custom-radio custom-control-inline"> <input name="$name" id="rb-$name-1" type="radio" class="custom-control-input" value="" $sel{E}> <label for="rb-$name-1" class="custom-control-label">$title1</label></div>) . qq(<div class="custom-control custom-radio custom-control-inline"> <input name="$name" id="rb-$name-2" type="radio" class="custom-control-input" value="1" $sel{1}> <label for="rb-$name-2" class="custom-control-label">$title2</label></div>) . qq(<div class="custom-control custom-radio custom-control-inline"> <input name="$name" id="rb-$name-3" type="radio" class="custom-control-input" value="0" $sel{0}> <label for="rb-$name-3" class="custom-control-label">$title3</label></div>); $code; } sub set { my ($form, $f, $v) = @_; my $object = $form->getDecorated; $object->{$f} = $v; } 1; 