Skip to content

Fixed forwarding empty multi-select fields. - #43

Open
0xLBF wants to merge 1 commit into
CalderaWP:masterfrom
0xLBF:submission_data_bug
Open

0xLBF wants to merge 1 commit into
CalderaWP:masterfrom
0xLBF:submission_data_bug

Conversation

@0xLBF

@0xLBF 0xLBF commented Dec 13, 2017

Copy link
Copy Markdown

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