How to insert multiple checkbox values into post as custom fields from frontend

For multiple selections to work the name attribute of your form has to be an array, you can specify that like this: name="fruits[]" – or as complete line:

    <input type="checkbox" name="fruits" id="fruits[]" value="apple" />

This is well documented, for example: