Skip to content

Conversation

@0xLBF
Copy link

@0xLBF 0xLBF commented Dec 13, 2017

select2 doesn't include a field in the POST if multiple selections are allowed but none were selected by the user. The processor normally forwards the submissions to a filter before saving, but the submission_data doesn't include such empty multi-select fields. The value of such an empty field, as returned by get_field_data, is null so update_post_meta still doesn't save it, but this patch allows a custom filter to handle it more easily (e.g converting null values to empty strings, arrays to comma separated lists etc.).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant