add form html elements and define js objects