How To Create Widgets Within A Form

How can i create a widget within form?

I have a data widget, i have to use it as a one of the formfield. what changes i should make to my model and view to do this.