How can I create a form to perform multiple functions?