Petr
asked 4 months ago

Hello, may I ask you for advice – I installed dw gdpr plugin, it works for me with DWAQ, but if the visitor wants to ask question and the GDPR check box is unchecked, the submit button is deactivated so the visitor does not receive any warning message about unchecked GDPR box if trying submit form. Is it possible to display warning message about an unchecked box – as if the mandatory fields are empty? No action may be confusing to the user…. Thank you in advance Petr

1 Answers
DominicStaff
answered 3 months ago

I this case, you can add the following code to the footer.php file to show the Alert when the checkbox not checked.

<script type="text/javascript">
    jQuery(document).ready(function($){
    $('.dwqa-content-edit-form, .dwqa-content-ask-form').on('submit', function(){
        $('.dw_gdpr-checkbox label').removeClass('error');
        var dw_gdpr = $(this).find('#dw_gdpr');
       
        if( dw_gdpr.length &&  !dw_gdpr.is(":checked")){
            alert('Please accept the privacy checkbox.');
            return false;
        }
       
    });
});
</script>
Petr
replied 3 months ago

Hallo Dominic, thank you very much!
Great plugins, great support!!!

Dominic Staff
replied 3 months ago

Yes, let me know if you have any issues or questions.

Powered by DW Question & Answer Pro