Hello @johnny ,
It works pretty with PHP 7.4, but don’t works with PHP 8.1:
the two fields
$crud->setRelationNtoN(
'suppliers',
'product_suppliers',
'suppliers',
'product_id',
'supplier_id',
'{n_1} {lf_nr}-{connection_id}'
);
$crud->setRelationNtoN(
'groups',
'product_groups',
'groups',
'product_id',
'group_id',
'{bez} {wa_grp}-{connection_id}'
);
are populated on product create with supplier_id and group_id (the user see in the select field supplier name and group name).
After save if I call the view form for the product, I can see the saved supplier and group (with both PHP 7.4 and 8.1 versions):
if I call edit form, the supplier and group names in select fields are invisible (PHP 8.1):
There are no error messages in CI- nor PHP-Log.
The supplier_id and group_id (hidden values) will be send to server with the save-button.
I can pick up the new supplier & group from select list, but it will overwrite the old saved data that I’m not able to see.
The edit form works perfect with PHP 7.4:
How to fix? I need PHP 8.1 for another parts of my project…


