1

I am able to see Checkbox on Bizfx but when I do the Update Data Templates in Sitecore then its showing Single-Line Text rather than a Checkbox

This is the code to add a property. I have declared it as a bool

model

model2

In the Bizfx when I open the field for the first time then it shows the field as the textbox

enter image description here

After entering true or false, then saving the field and opening it again shows the checkbox

enter image description here

But in Sitecore it always displays single-line text. I have run Delete Data Templates and Update Date Templates but it always shows the single-line text

enter image description here

Has anyone experienced the same thing and how to resolve this?

Any help or suggestion would be appreciated

Thanks in advance

1
  • 1
    Ideal this should work but tried removing Nullable type in property.From "bool?" to "bool". – Akash S Apr 20 at 8:26
4

You have to change property type from bool? to bool:

public bool PropertyDetailsInOffer { get; set; }

bool values will be rendered as checkboxes for supported UI Hints, otherwise rendering as a string value.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.