The write method on an I/O port isn't for setting the value of input fields. I/O ports can have output fields as well, with handlers supplied by a device. That's what write is for.