-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix: Checkbox group in form return bool #5366
Conversation
Just tested it works ! 👍 |
@kuzmany |
@johbuch works just with one option in checkbox group. This patch resolve just one option and covert value from array to normal value. Naturally |
So if i understand well, for this 2 options boolean, it shouldn't be a checkbox group but a radio button right ? Thanks ! |
@npracht yeas multiple checkboxes return multiple values, then we can't save multi values (array) to single contact field. |
Hi, I have the same problem, but my custom field isn't a boolean : it is a Select data type with only two values : "Yes" and "No" (don't ask me why I didn't use a boolean, I don't know). I previously used a checkbox form field to update my custom field in a form, but since last release (2.11.0), my value isn't saved anymore. (I'm now using two radio inputs while waiting for a solution.) I thought this patch would solve my problem, but sadly no. |
Was able to reproduce bug and fix. Thanks |
Description:
This bugfix/feature has been sponsored by @Webmecanik
Form checkboxgroup return array then it wansn't possible match value to contact field and was ignored.
This fix just check if value is array and with 1 size and then convert array to value.
Steps to reproduce the bug:
Steps to test this PR: