Form / Checkbox "required" not working as expected

  • Unknown's avatar

    Hi guys,

    I have a form on my web page that contains several fields including a checkbox.
    The checkbox is set to “required”.
    But, it is still possible to submit the form when the checkbox is not checked.
    Any ideas why my unchecked “required” checkbox does not prevent the form from getting posted?

    My site is “thingsrock621581448.wpcomstaging.com”.

    Thanks,
    Norman.

    The blog I need help with is: (visible only to logged in users)

  • Hi Norman,

    The form you’re using on that page is added by the Coblocks plugin in your site, so we don’t have any control over how it works. That plugin is made by GoDaddy, and it looks like they already have an open bug report for this issue over there at https://github.com/godaddy-wordpress/coblocks/issues/1517. I’ve added a comment there that you’re also running into this issue, but this is something GoDaddy would need to fix in a future update of this plugin.

    As an alternative, can I suggest that you use the Jetpack form block instead?

    https://d.pr/i/XGowXS

    I’ve checked and that form does give an error if a required checkbox is not checked. You can find details on how that form works here:

    Form Block

    Also note that your plan gives you access to both live chat and direct email support. You can reach those at any time by clicking the Help icon that appears bottom-right on all the My Sites pages, or else via the direct link at https://wordpress.com/help/contact

  • Unknown's avatar

    Hi kokkieh,

    I tried your suggested alternative and it works like a charm now.

    Actually, I wasn’t aware that there are multiple “form” blocks from different vendors by default.

    Anyway, thanks for your help.

    Regards,
    Norman.

  • The topic ‘Form / Checkbox "required" not working as expected’ is closed to new replies.