cancel
Showing results for 
Search instead for 
Did you mean: 

Set the value of a checkbox on a form

David_Chatterto
Star Collaborator
Star Collaborator

Hello,

 

I'm trying to use the method 'SetFieldValue' on a checkbox on a form but it's not working. Can someone advise if it's possible to change the value of a checkbox using a script?

 

Thanks.

1 ACCEPTED ANSWER

Justin_Carlson
Employee
Employee

When you configure the Unity Form Template and add a Check Box, one of the properties on the Check Box is "Checked Value". This is the value that the keyword or field gets set to when the box is checked. So I think the same is true that to get it to appear as checked, you would need to set the field value to the "Checked Value". The checked value can be anything that is valid for the data type, so it's not just "true" or "1". It could be the actual word of "Checked" or something like that.

So you'll need to check the Unity Form template I believe.

View answer in original post

1 REPLY 1

Justin_Carlson
Employee
Employee

When you configure the Unity Form Template and add a Check Box, one of the properties on the Check Box is "Checked Value". This is the value that the keyword or field gets set to when the box is checked. So I think the same is true that to get it to appear as checked, you would need to set the field value to the "Checked Value". The checked value can be anything that is valid for the data type, so it's not just "true" or "1". It could be the actual word of "Checked" or something like that.

So you'll need to check the Unity Form template I believe.