Multiple values selection with checkboxes #11
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This code will allow the user to select more than one option when the 'other field' has a specific set of values (previously showed as radio buttons).
This is restricted to the "=" operator, since it would not be useful for the other operators.
It works by changing the radio buttons to checkboxes, and when the user selects more than one checkbox, the code will check if the current value is equal to one of the options selected.
When the user selects a different operator, a javascript function is triggered and changes the checkboxes back to radio buttons.
The multiple choice is also reflected into the custom fields list as shown

The prettifier has added a lot of edits into the js files, I'm sorry. To ease the task of looking for meaningful edits, in the "bp-conditional-field.js" file I've edited only the "match_condition" function, while in the "bp-conditional-field-admin.js" file I've added a function called "switchOtherFieldButtonType" and the two lines that use it.