Webflow form - Do not send empty checkboxes

Hi Louise,

There are no silly questions, only silly answers - hope mine will make sense :slight_smile:
The HTML form I wrote in my codepen was just to reproduce the Webflow form structure.

I made a quick Webflow project for you to have a look at.
However, unlike codepen, it seems Webflow has its own default behaviour with submit button…

We first need to unbind that default behaviour from webflow, then run our script.
Classes and IDs are to be setup in the css panel of the elements.

Javascript is to be, for now, copy pasted within the custom code area at page level.
As you can see, I modified the script to unbind Weblfow default behaviour but no luck so far.
Here is the post I inspired myself from.

We might need the precious insights of @cyberdave, @T-Fab or @webdev maybe ? :slight_smile:

Read-only link here:
https://preview.webflow.com/preview/empty-input-test?utm_source=empty-input-test&preview=59510b7dfb5d41285b53bea87cd7bfcb

Updated codepen here:
https://codepen.io/anthonysalamin/pen/yWzJOG
PS: if you open the console, you can see what the script is doing to your empty inputs.