Logic to change the text field values when dragging the sliders