-Changed the way the #attempts is calculated for text input fields