How to allow a checkbox to create a greyed out/disabled field

Hi everyone,

 

This may be a simple fix, but I cannot get it right. I have created a form where the user can input their SSN. If they do not have a SSN, they have to check a checkbox and the field for Social security number should become greyed out/disabled but that is not working currently. I am only able to make the field null. Currently, these are the relevant pieces of my code:

rule!AF_CMPT_General_booleanCheckBoxField(
choiceLabel: "I don't have an SSN",
choiceValue: {
true
},
value: local!checkbox,
saveInto: {
local!checkbox
}
),

}
),

rule!AF_CMPT_General_textField(
label: cons!SOCIAL_SECURITY_LABEL,
readOnly: if(
isnull(
local!checkbox
),
false,
true
), 
value: 
if(
isnull(
local!checkbox 
),
ri!boardUser.socialSecurityNumber,
{}
)

The {} is where the number currently is blank if the user checks the "I don't have an ssn" checkbox.

 

Any help would be appreciated.

  Discussion posts and replies are publicly visible

Parents Reply Children
No Data