Added setForm function in constructor

Now it using setForm function to sets the form in constructor