Added logic to support text display and capture the value