Jump to content

Mandatory checkboxes in Commerce custom fields


Go to solution Solved by opentype,

Recommended Posts

Posted

Hi,

these checkboxes are not mandatory (checked) in the form. I assume they should be?

Field name could be something like "I approve that etc...".

Could contain: Electronics, Hardware, Computer Hardware, Monitor, Screen

  • Solution
Posted (edited)

Fox Tv GIF by ProdigalSonFox

A checkbox allows for “0” and “1” and “0” is technically a valid choice. 

By the way: the “Checkbox Set” field does work as you request it here, even if there is just one choice given. In this case, it’s “at least one field must be checked”. I use this option to create a mandatory license agreement in one of my stores. 

Edited by opentype
Posted
18 hours ago, teraßyte said:

A required checkbox field should always require a 1 value IMO. I consider it a bug.

Not really. What if you wanted something like "Check this box if you would like to receive a big hug from teraßyte" ?

18 hours ago, teraßyte said:

Or at least add a new setting that allows you to require it to be actually checked on submission. 🤷‍♂️

Thats a fair suggestions of course

Posted
5 minutes ago, Marc Stridgen said:

Not really. What if you wanted something like "Check this box if you would like to receive a big hug from teraßyte" ?

It's checked and locked by default 😛

Seriously, you can use Yes/No sliding switch/button.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...