# HTML Form Checkbox Attribute

# Checkbox Handling on HTML Form

You can easily handle the checkbox data on Getform. If you have a checkbox field on your form, simply add a hidden input field for "not selected" case and set its value to value="no". For the selected case, do the same with value="yes"

Sample form should look like this:

<form action="https://getform.io/f/{your-form-endpoint}" method="POST">
    <input type="email" name="email">
    // Checkbox handle
    <input type="hidden" name="subscribe" value="no">
    <input type="checkbox" name="subscribe" value="yes" checked>
    <button type="submit">Send</button>