Note: this tutorial is meant for the premium version.

You may want to add some custom validation on one of the fields displayed on the WP Optin Wheel form. For example, let’s say you want to test that a date entered is before 1 January 2018. To do so, you can add the following JavaScript to your theme:

    var value = data.value.split('/');
    if(!value) return false;
if(value.length != 3) return false;
        var d = new Date(value[2]+'-'+value[1]+'-'+value[0]+'Z');
        var dec1 = new Date('2018-01-01Z');
        return d >= dec1;
    }catch(err){return false;}

Take note of the filter id ‘wof-validate-MMERGE3’. Replace MMERGE3 with the ID of your field. The ID can be found in your email list software such as MailChimp.