refactor forms
add jquery to template