Add form field to set the database name for a resource of type db

fixes #5115