Hello,
I have a question relating to the Profile API, checkbox and boolean database field.
I have a form that has a check box for user consent. If a user check it, the value is set to 1 so that in the database I can use Boolean data type for the consent field.
When I enable Profile API on the form, obviously profile API cannot match back the 1 value for the checkbox to check the box.
How can I resolve this issue? I am thinking I can use Java script to translate the 1 values and check the appropriate box.
Questions I have are
1. Which code block run first when a form is loaded: the Javascript block or Profile API?
2. Even if the checkbox is not checked properly, does profile api correctly load the value from database to to corresponding form input field value?
3. If I read the field value from Javascript and if it is one, check the corresponding checkbox, when the user submit the data, will the correct data write back to the database (of course I have Editable on in profile api).
Thanks.
I have a question relating to the Profile API, checkbox and boolean database field.
I have a form that has a check box for user consent. If a user check it, the value is set to 1 so that in the database I can use Boolean data type for the consent field.
When I enable Profile API on the form, obviously profile API cannot match back the 1 value for the checkbox to check the box.
How can I resolve this issue? I am thinking I can use Java script to translate the 1 values and check the appropriate box.
Questions I have are
1. Which code block run first when a form is loaded: the Javascript block or Profile API?
2. Even if the checkbox is not checked properly, does profile api correctly load the value from database to to corresponding form input field value?
3. If I read the field value from Javascript and if it is one, check the corresponding checkbox, when the user submit the data, will the correct data write back to the database (of course I have Editable on in profile api).
Thanks.