This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.

dmag
dmag

The FileUpload backend form widget has onUpload() method that I need to access in my backend to make some changes to it instead of modifying the core file directly.

How do I access the onUpload() method of the form widget in my plugin?

Last updated

mjauvin
mjauvin

You should be able to override this method in the Controller class using that form.

dmag
dmag

Could please give me a quick example? I'm not sure how to proceed with it.

mjauvin
mjauvin

What I suggested above won't work, the handler is prefixed with the Widget alias... one way that'll work is if you create a new FormWidget that extends the core FileUpload widget and override its onUpload() method. Then register this formwidget in your plugin and use the new name in your forms.

1-4 of 4

You cannot edit posts or make replies: the forum has moved to talk.octobercms.com.