Forum Discussion

shawn_fielding's avatar
shawn_fielding
Iron Contributor
Jan 22, 2020

JSON to customize a ranking question in a survey

Hi all,

 

I have a survey with a ranking question.  It actually has quite a few rankings in it.  I need to add space between every ranking.  I am using SharePoint online so adding the css must be done via json.  See attachment.  I cannot figure out the json style format to do this.  Here is what I have.  What am I doing wrong?

 

{
"$schema": "https://developer.microsoft.com/json-schemas/sp/column-formatting.schema.json",
"elmType": "div",
"txtContent": "@currentField",
"style": {

}"padding-bottom": "30px"

}

4 Replies

  • RobElliott's avatar
    RobElliott
    Silver Contributor

    shawn_fielding have you considered using Microsoft Forms for this rather than the older survey app?

     

     

    Rob
    Los Gallardos
    Microsoft Power Automate Community Super User

  • Paulo Junior's avatar
    Paulo Junior
    Brass Contributor

    Hi shawn_fielding ,

     

    Try the "padding" inside of "style":

     

    "style": {

    "padding-bottom": "30px"

    }

     

    See a lot of examples in:

    https://github.com/sharepoint/sp-dev-list-formatting/tree/master/column-samples

     

    See the also:

    https://docs.microsoft.com/en-us/sharepoint/dev/declarative-customization/column-formatting

     

    I hope this helps you 🙂

     

     

     

    • shawn_fielding's avatar
      shawn_fielding
      Iron Contributor

      Paulo Junior Unfortunately that does not seem to be the problem.  For some reason, the css changes are just not taking in the survey.  It looks just gawd-awful.  I am sure I can't be the first person to need customize it.  Perhaps it is the schema I am pointing to?

Resources