Issue with returning input values in dynamic form