restricts user input in form