Refactor to use hidden field elements.