adds helper function to return the html generated by the form