I made a generic function that generates some form fields, because I need them at many different places in my app. It has an optional parameter for setting the visibility