Generate input id so it will not clash if multiple forms. Extract functional test util.js for convenience.