How to set attributes in form fields

I thought it would be a good idea to describe how to set attributes on form fields