Contribution page, completing this form on behalf of someone else: JavaScript error for checkbox field
On a contribution page, when "completing this form on behalf of someone else", a JavaScript syntax error occurs when the page includes a profile with a checkbox field and the contact has this field checked.
Steps to replicate:
-
Create a custom field, Test Checkbox: Alphanumeric, CheckBox with 1 option: label "I agree", value 1.
-
Create a profile including this field.
-
Include this profile on a contribution page.
-
Edit Contact A and check the "I agree" checkbox.
-
On the contribution page, click "Not demo test, or want to do this for a different person?"
-
Choose Contact A.
Expected result: Form populates with Contact A's data.
Actual result: JavaScript error: "Syntax error, unrecognized expression: [name=custom_13[1]]". Form does not populate with Contact A's data.
I have a fix for this, will create a PR & link to this issue.