HowTo/Best Practice adding custom attribute on Item Form Doctypes?

Hi all,

Would like to implement addition of this code attributes via Setup > Customize Form > Item > Button in DOCTYPE

<button class="btn btn-default" type="button" **data-toggle="modal" data-target="#livestream_scanner"**>

What would be best practice for adding both attributes into the element as i aware the HTML elements are generated dynamically and read the guides? As i needed both attributes to trigger certain events

Many Thanks