Like what we’re doing? Star us on GitHub!

ratio field Why must one be selected?

zhounewz
last month
1 4

image

image

There are cases where neither is selected. This situation cannot be achieved with ratio

  • DanRibbens
    Payload Team
    last month

    The required validation on radios was fixed in a more recent version. Upgrading Payload will help, but not completely fix your problem.

    Radio inputs in the browser don't work the way you want. There is no way to deselect a value without adding a clear button. You need a third option for 'null' in your list it seems.

  • zhounewz
    last month

    It can only be realized by select, but it is inconvenient

    2 replies
    JessChowdhury
    Payload Team
    last month

    @zhounewz change require to required and give that a shot.

    JessChowdhury
    Payload Team
    last month

    @zhounewz also if your options only need to be true and false, you could use a checkbox field here.

  • zhounewz
    last month

    Changing from require to required didn't work.
    image
    There are 3 options for me, unselected, true or false.

    1 reply
    JessChowdhury
    Payload Team
    last month

    @zhounewz what version of payload are you on?

  • zhounewz
    last month

    @JessChowdhury "payload": "1.2.5"

Open the post
Continue the discussion in GitHub
Can't find what you're looking for?
Get help straight from the Payload team with an Enterprise License.Learn More