How can i access to the value of the form field


I have created a form without use DataModel like so.

$ls_stock_form = $app->add(‘Form’, [‘segment’]);
$ls_stock_sub_layout = $ls_stock_form->layout->addSubLayout(‘Generic’);
$ls_stock_sub_layout->add([ ‘Header’,‘Warenaus- und -eingang’]);
$ls_stock_sub_layout->addField(‘ref_date’, [‘Calendar’, ‘type’ => ‘date’, ‘caption’ => ‘Stichtag’]);

Then I want to initialize the array by the date what I gave on the form of field ‘ref_date’.

$lt_result = (new myHelpData())->get_stock_ea_by_date($ls_stock_form->model[‘ref_date’]);

But I get always empty value from ($ls_stock_form->model[‘ref_date’]). I want to use

$ls_stock_form->getField(‘'ref_date’) ……… , but I do not know, how can I do it. Can someone give a small tip ? thanks

I probably implemented incorrectly ? or can someone help? :slight_smile: