Linked text and select fields

Just a quick snippet for my own reference (or yours) to link together text fields and select fields so that changes to one change the other.

Assumes the matched fields have IDs of :

  • text field: someFieldID
  • select field: someFieldIDSel

Assumes and initial, unselected Select option with a value of “invalid”.

It also prevents the insertion of illegal values into the text box.

Leave a Reply

Your email address will not be published. Required fields are marked *