I have a requirement where I need to create a custom widget to Elementor. I will have two text fields and a button on this widget and when I click on Button. I have to trigger an event.
But, I am not getting any button Id on the HTML page when I tried to create a button using this code.
'submit_content',
[
//'label' => __( 'Submit Content', 'plugin-name' ),
'type' => ElementorControls_Manager::BUTTON,
'separator' => 'before',
'button_type' => 'success',
'text' => __( 'Submit Product', 'plugin-domain' ),
'event' => 'namespace:editor:submit',
]
);
Is there any way, I can create any id with this button? Or any way I can use this button on click event at javascript or PHP side?
2
Answers
Also you can call it by javascript (without using jquery) like this :