adjusting input fields based on the content length on page load and when typing via js. borrowing some of this code from my other project