Use the name attr from the input instead of the field.

This will allow it to work if we are changing the name of the input for
any reason.