create template function to help with creating forms