Ansonsten wird initial nichts angezeigt.
use strict;
+use SL::DB::Part;
+
use Exporter qw(import);
our @EXPORT = qw(part_picker);
my ($self, $name, $value, %params) = @_;
my $name_e = $self->escape($name);
+ $value = SL::DB::Manager::Part->find_by(id => $value) if !ref $value;
+
my $ret =
$self->input_tag($name, (ref $value && $value->can('id') ? $value->id : ''), class => 'part_autocomplete', type => 'hidden') .
$self->input_tag("", delete $params{type}, id => $self->name_to_id("$name_e\_type"), type => 'hidden') .