Only add input classes to form fields if they exist.

I encountered an error when using the generic DeleteView. By default the confirmation form created does not have any input fields. This raise an exception since element was an empty string.