Fix form creation functionality