my $type = $form->{type};
$type = $form->{formname} if $form->{formname} && !$form->{type};
$type = $form->{attachment_type} if $form->{attachment_type};
my $id = $form->{id};
$id = $form->{attachment_id} if $form->{attachment_id} && !$form->{id};
return if !$id || !$type;
my $type = $form->{type};
$type = $form->{formname} if $form->{formname} && !$form->{type};
$type = $form->{attachment_type} if $form->{attachment_type};
my $id = $form->{id};
$id = $form->{attachment_id} if $form->{attachment_id} && !$form->{id};
return if !$id || !$type;