Try our conversational search powered by Generative AI!

[Required] Checkbox issue


Hello! I want a checkbox to show up instantly when creating a page. To do this with other types I just add the [Required] attribute to the property. However, it works differently with checkboxes, because for it to be treated as specified it needs to be set to true. If I put required on it it will show up but if I don't check it (as in set it to true) I can't create the page.

Is there any other way I can make it show on page creation not using [Required]?

            Name = "Visa bild publikt",
            Description = "Om denna är ikryssad så visas bilden även om man inte är inloggad",
            GroupName = SystemTabNames.Content,
            Order = 600
        public virtual bool ShowImagePublic { get; set; }
Nov 05, 2015 8:23

Not sure if this works, but what if you create an image block with this property and the image, and set the block property to required?

Nov 05, 2015 9:42

I'd say it's a flaw in the design, aka a bug.

Nov 05, 2015 14:16

Btw, we've solved similar situations earlier with using a select with Not set/True/False instead of having a checkbox.

Nov 05, 2015 14:18

It would be nice if it worked to use a checkbox but apparently it doesn't, for now using a select with values yes, and no will suffice.

Thanks for the help!

Nov 05, 2015 15:37


I prepared blog post about how you could solve it. Here is the link.

The source code is available on gist.

Nov 06, 2015 19:22
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.