A lot of this could be solved with text2num and maybe an if(whatever >= 1 && whatever <= 7) for validation