A search on ‘add multiple button’ turned up these learning case examples
The above all suggest this js code is what to check frappe/frappe/public/js/frappe/form/grid.js at develop · frappe/frappe · GitHub