A form which submits all its items properly to the Netlify forms shows the checkboxes values as empty, no matter if the checkbox has been checked or not.
HTML/Nunjucks partial:
{# checkboxes #}
<fieldset class="check-container col-12 px-md-0">
{# subscribe to newsletter #}
<div class="form-check">
<input
type="checkbox"
id="subscribeCheck"
name="subscribeCheck"
value="newsletterSubscription"
class="form-check-input"
/>
<label class="form-check-label" for="subscribeCheck">
</label>
</div>
{# subscribe to newsletter end #}
{# 18+ #}
<div class="form-check">
<input
type="checkbox"
id="rulesCheck"
name="rulesCheck"
value="rulesCheck"
class="form-check-input"
required
/>
<label class="form-check-label" for="rulesCheck">
</label>
</div>
{# 18+ end #}
</fieldset>
{# checkboxes end #}
Is there a way to force a true
/false
value for the checkbox data?
Aucun commentaire:
Enregistrer un commentaire