The other point I didn't make clear was that it seemed to work fine on just the first field, but when I added others they were the ones that didn't clear after input into the ...
I got it working with some experimenting. The problem seems to be in using a form="formname" instead of the default form. When I removed all references to "RegistrationForm" it worked correctly.