I have a frontend entry form with some checkboxes that is not behaving correctly.
If you uncheck all options and save, nothing changes (this is bad). However if you uncheck one item and check another item it saves correctly.
Additionally in the Craft CP if you uncheck all items it saves correctly so it clearly works there.
relevant template code:
{% for volunteer in craft.entries.section('careers').search('positionType:volunteerPosition') %}
<label class="d-block">
<input type="checkbox" class="form-check-input" name="fields[volunteerPositions][]" class="form-check-input" value="{{volunteer.id}}" {% if volunteer.id in selectedEntries %}checked{% endif %}> {{volunteer.title}} (created by {{volunteer.author }})
</label>
{% endfor %}
Please advise.