Add support for dynamic widget attributes

Sometimes it is desirable to set widget attributes after the form is
created. This makes it possible and should be fully backwards
compatible.