Want my radio button choice to control which text field shows
I am a newbie trying to do something similar to "Hide text field on radio button for JSNewbie." (matth92962896 New Here, Jun 06, 2018) - but I can't make it work.
I want my radio button choice to control which text field shows.
My radio button group is "payment-PWB" choices are "Choice1-PWB" "Choice2-PWB" "Choice3-PWB"
Coordinating text fields are "check for-PWB" "CC for-PWB" "wire transfer-PWB"
I tried creating a hidden text field and set this code as its custom calculation script:
var v = this.getField("payment-PWB").valueAsString;
this.getField("Choice1-PWB").display = (v=="check for-PWB") ? display.visible : display.hidden;
this.getField("Choice2-PWB").display = (v=="CC for-PWB") ? display.visible : display.hidden;
this.getField("Choice3-PWB").display = (v=="wire transfer-PWB") ? display.visible : display.hidden;
but it's not working. Can anyone see what I am doing wrong? I would greatly appreciate any advice!
thank you
