0

I am looking to change how the display form looks. I have been searching for hours and don't know if what I am trying to accomplish is possible.

When I have a choice field with check boxes it displays them as Item1 , Item 2, Item 4, item 5.

I want to change the display view to look like the edit view with out having the rights to change it as seen here.
enter image description here

0

If you don't already know about JSLink in SP2013, have a look at some examples here.

JS Link allows you to override the way data is rendered on various forms - viz. new, edit, view. In your case, new and edit forms are already behaving the way you want, but you need to override the view form for given field.

So you can choose to override your checkbox field, and instead of returning the comma-separated values, return something like this, (pseudocode alert)

    var selectedValues = commaSeparatedString.Split(',')
    // Get all choices on the field, say variable "allChoices".
    // I don't know how to get the choices dynamically, but you could *hardcode* if they are meant to be static over time.

    // Get the checked values first.
    foreach(choice in allChoices)
    {
        if(selectedValues.HasTheField(choice))
        {
             returnString += "<input type="checkbox" checked disabled>" + choice + "<br />";
        }
        else
        {
             returnString += "<input type="checkbox" disabled>" + choice + "<br />";
        }
    }

    function HasTheField ...
  • Thank you this has been helpful. It pointed me in the right direction. – Andrew May 2 '16 at 14:12
  • That's great! Do share if you get anything in JS working to get those choices working.. – Nisarg May 2 '16 at 14:36

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.