Bug 902118 - Removing generated hidden form fields

When changing application type modes, the rails generated hidden
fields are stripped out.