Form inside a widget - submit button

Hi there,

I’ve got a form in a Widget (that extends CWidget) but I want a button external to the widget (in the view that embeds the widget) to submit the fields of the Widget’s form.

Is that possible ?



You can attach JavaScript code to the button and set id attribute for the widget’s form, so when you click the button the attached code will find the widget’s form by it’s id and submit that form with the values set by the JavaScript code.