Using form elements and scripting to create interactive forms