In CakePHP 3.x, how can I prevent saving redundant data (on subsequent IDs in the database) after clicking quickly several times on "add" button of the form. My saving function is simple:
if(isset($aaa) && $aaa!=null)
$aaa=$this->A4->patchEntity($aaa,array(...));
else
$aaa=$this->A4->newEntity(array(...));
if($this->A4->save($aaa)){ ... }