Skip to content

Formular checkbox behaves like radiobutton #11

@AndySilvia

Description

@AndySilvia

Hi!

I made a little test-task/-formular to test the different field types and there I fell over a strange thing:

Step-file-excerpt:

  • name: Feld4
    type: checkbox
    label: Feld4-checkbox
    values:
    - label: Check1
    value: Check1
    - label: Check2
    value: Check2

Task-excerpt:
my $fcmdb = get cmdb "testform";
my $feld4 = $fcmdb->{Feld4};
say "Feld4: ";
say Dumper($feld4);

Problem:
If I don't check a value, $feld4 is correctly undef, If I check first value feld4 is correctly "Check1", if I check second value feld4 is correctly "Check2", but if I check both values, feld4 is "Check1" too...

Log-excerpts:

Checked first value:
Feld4:
$VAR1 = 'Check1';

Checked second value:
Feld4:
$VAR1 = 'Check2';

Checked none:
Feld4:
$VAR1 = undef;

Checked both:
Feld4:
$VAR1 = 'Check1';

Even if I make
say Dumper($fcmdb);

It logs:
$VAR1 = {
'Feld4' => 'Check1'
};

Am I doing something wrong or is there some kind of failure?

Thanks for clarification in advance!

Bye,

AndySilvia

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions