I need to enable or disable a submit button based on the value of a data field stored in a database. I have found working examples of how to enable or disable based on a checkbox; but, I need it to work based on a data field value. I have created a textbox in a hidden area that contains the stored data value. I have set the beginning value of the submit button to disabled. I want the submit button to be enabled if the value in the textbox is "YES" and to remain disabled if the value is "NO". The textbox name is "vehiclesAccurate"; and, the name of the submit button is "B1" and the id is "b1".
The submit button is now disabled. What script code will I need to make it enabled if the value of vehiclesAccurate="YES"?