added logic to dynamically load current input values from the dom via javascript