Render form and serialize it to an object on submit