How to set a id attribute to button?
I believe you cannot set id to a button using php however you can define your own class for the button and use JS to set the id for that class.

Here is the snippet to add class for button

$this-&gt;addButtons([[
  'type' =&gt; 'next',
  'name' =&gt; E::ts('Next'),
  'isDefault' =&gt; TRUE,
  'class' =&gt; 'custom_class', //adding class for button
));


HTH

Pradeep