fix(form): replace outdated js function