Hello,
I have another question which is - i think so - a very easy question.
Here is my code for creating a form:
function Form() {
$SkripteAll = SkriptHelper::GetSkripte()->toDropdownMap('ID', 'Name');
$fields = new FieldSet(
new DropdownField('Skript','', $SkripteAll)
);
$actions = new FieldSet(
new FormAction('doSubmit', 'Anzeigen')
);
$form = new Form(
$this,
'Form',
$fields,
$actions,
null
);
return $form;
}
Now I want to know in the doSubmit method, which item the user has selected.
With
$data['Skript']
in the doSubmit method I get the ID (for example 1). But I want to know the name or much better I want to know the complete Skript-object, which I have mapped from the database into the dropdownfield.
Can anyone help me with my problem?
Best regards Beppo