how to have conditional Help text for a listbox field
You don't have to code for this. You can use Conditional Fields to achieve it.

You can then use "Manage Dependencies" section (alongside manage display) to set the dependencies:



Then you can see the different fields being enabled or disabled depending on the entered input:

List option "No" Result:



List option "Yes" Result: