Add Action to generate form, and fix ajax form