Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • person2 11 posts 81 karma points
    Jun 11, 2020 @ 13:47
    person2
    0

    Umbraco.TrueFalse Checkbox Default Value

    I have added a checkbox toggle to one of my Document Types and set the default value to true.

    The UI in my document type shows it is enabled but it actually returns a false value. And when I publish the document type the UI updates and shows the button in its falsy state.

    I have hundreds of this particular document type which I need the default value to be true and do not like the idea of manually setting them all to true.

    Is there a known issue around this or is there some way I can work around this without having to manually set all the checkboxes to true?

  • Nik 1591 posts 7148 karma points MVP 6x c-trib
    Jun 11, 2020 @ 13:53
    Nik
    0

    Hi Person2,

    This does sound like it could be a bug in that it's not handling the default state properly.

    You could use this approach to set the default value when the page is being created in the back office https://justnik.me/blog/how-to-add-default-values-to-properties-in-the-backoffice-for-umbraco-v8

    Nik

Please Sign in or register to post replies

Write your reply to:

Draft