Smart UI Components & Libraries – Grid, Scheduler, Gantt, Kanban for Angular, React, Next.js, Vue, Blazor, JavaScript › Forums › General Discussions › smart form controlType button add event handler This topic has 2 replies, 2 voices, and was last updated 2 years, 9 months ago by jqwidgetsdev. Viewing 3 posts - 1 through 3 (of 3 total) Author Posts January 31, 2023 at 10:50 pm #104332 jqwidgetsdevParticipant Hi, In a smart form, when I add controlType: “button” what is the way to assign a custom event handler? { controlType: "button", label: <code>Run</code>, }, I thought this would do it, perhaps controlType: button needs to be treated differently? const smartButton = document.querySelector('smart-button'); smartButton.addEventListener('click ', function (event) { console.log('hello world'); }); Any clues? February 1, 2023 at 7:19 am #104333 svetoslav_borislavovParticipant Hi, You have done it correctly but have a space in the event name – ‘click ‘. It should be only ‘click’. Try it and the problem must be fixed Best Regards, Svetoslav Borislavov Smart UI Team https://www.htmlelements.com/ February 1, 2023 at 12:42 pm #104336 jqwidgetsdevParticipant Hi Svetoslav, Ok yeah sorry for bothering you about something so small. Thanks. Author Posts Viewing 3 posts - 1 through 3 (of 3 total) You must be logged in to reply to this topic. Log In Username: Password: Keep me signed in Log In With Google Log In