Hide/Show Function Not Working

Hide/Show Function Not Working

I have implemented the simple hide/show function on my form to achieve a simple outcome.

I want to hide fieldA on load so I have added to the On Load Diluge Editor hide fieldA;

I want to show fieldA when fieldB which is a radio box has the option "Yes" selected. I have therefore add to fieldA the following on user input script:

if (input.fieldB  ==  "Yes")
{
    show fieldA;
}
else
{
    hide fieldA;
}

For the life of me I can not get the simple function to work. Very frustrating. The form doesn't update itself to reflect the selection the user has made.