class CustomerAddress extends \atk4\data\Model
{
public $table = 'customer_address';
public $title_field = 'type';
public $title = 'Address';
function init()
{
parent::init();
$this->addField('type');
// Field Declaration
$this->hasOne('customer_id', new Customer());
$this->hasOne('address_id', [new Address(), 'ui'=>['form'=>['AutoComplete', 'plus'=>true]] ])
->addTitle();
$this->addField('created_on', array('type' => 'datetime', 'system' => 1, 'default' => date('Y-m-d H:i:s')));
}
}
When editing back the CustomerAddress via the modal dialog, using the grid edit button, then the autocomplete input in modal is not populate with data.
If editing the record via the link using another tab, then autocomplete is workging fine.
Screen shot using a modal edit
Screen shot using tab edit:
Autocomplete field data is populate correctly in Tab edit but not in Modal edit.
Autocomplete field is not populate with table data when editing a record using a modal.
When editing back the CustomerAddress via the modal dialog, using the grid edit button, then the autocomplete input in modal is not populate with data.
If editing the record via the link using another tab, then autocomplete is workging fine.
Screen shot using a modal edit
Screen shot using tab edit:
Autocomplete field data is populate correctly in Tab edit but not in Modal edit.