Fix issue where text inputs with empty string values have redundant underscores on the end of their id attributes