generate ajax form with snippet example