ajax setup to work with form generator