Passing an input field to a Text element is not working