How to add custom button on web form

Hi Everyone,

Is there any way to add custom button in web form?
Appreciated if someone can do earlier.

Hello

You can try below code in your web form js

frappe.web_form.add_button_to_footer("test", "submit", ()=>{alert('Hello World')})

source code: frappe/web_form.js at develop · frappe/frappe · GitHub