Refactors form field input templates.