save input attributes into array