move form and template to script