JSON to customize a ranking question in a survey

%3CLINGO-SUB%20id%3D%22lingo-sub-1122447%22%20slang%3D%22en-US%22%3EJSON%20to%20customize%20a%20ranking%20question%20in%20a%20survey%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1122447%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20all%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%20a%20survey%20with%20a%20ranking%20question.%26nbsp%3B%20It%20actually%20has%20quite%20a%20few%20rankings%20in%20it.%26nbsp%3B%20I%20need%20to%20add%20space%20between%20every%20ranking.%26nbsp%3B%20I%20am%20using%20SharePoint%20online%20so%20adding%20the%20css%20must%20be%20done%20via%20json.%26nbsp%3B%20See%20attachment.%26nbsp%3B%20I%20cannot%20figure%20out%20the%20json%20style%20format%20to%20do%20this.%26nbsp%3B%20Here%20is%20what%20I%20have.%26nbsp%3B%20What%20am%20I%20doing%20wrong%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%7B%3CBR%20%2F%3E%22%24schema%22%3A%20%22%3CA%20href%3D%22https%3A%2F%2Fdeveloper.microsoft.com%2Fjson-schemas%2Fsp%2Fcolumn-formatting.schema.json%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdeveloper.microsoft.com%2Fjson-schemas%2Fsp%2Fcolumn-formatting.schema.json%3C%2FA%3E%22%2C%3CBR%20%2F%3E%22elmType%22%3A%20%22div%22%2C%3CBR%20%2F%3E%22txtContent%22%3A%20%22%40currentField%22%2C%3CBR%20%2F%3E%22style%22%3A%20%7B%3C%2FP%3E%3CP%3E%7D%22padding-bottom%22%3A%20%2230px%22%3C%2FP%3E%3CP%3E%7D%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1122447%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3ESharePoint%20Online%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1125731%22%20slang%3D%22en-US%22%3ERe%3A%20JSON%20to%20customize%20a%20ranking%20question%20in%20a%20survey%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1125731%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F28784%22%20target%3D%22_blank%22%3E%40Paulo%20Junior%3C%2FA%3E%26nbsp%3BUnfortunately%20that%20does%20not%20seem%20to%20be%20the%20problem.%26nbsp%3B%20For%20some%20reason%2C%20the%20css%20changes%20are%20just%20not%20taking%20in%20the%20survey.%26nbsp%3B%20It%20looks%20just%20gawd-awful.%26nbsp%3B%20I%20am%20sure%20I%20can't%20be%20the%20first%20person%20to%20need%20customize%20it.%26nbsp%3B%20Perhaps%20it%20is%20the%20schema%20I%20am%20pointing%20to%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1123325%22%20slang%3D%22en-US%22%3ERe%3A%20JSON%20to%20customize%20a%20ranking%20question%20in%20a%20survey%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1123325%22%20slang%3D%22en-US%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F406546%22%20target%3D%22_blank%22%3E%40shawn_fielding%3C%2FA%3E%26nbsp%3B%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ETry%20the%20%22padding%22%20inside%20of%20%22style%22%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%22style%22%3A%20%7B%3C%2FP%3E%3CP%3E%22padding-bottom%22%3A%20%2230px%22%3C%2FP%3E%3CP%3E%7D%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ESee%20a%20lot%20of%20examples%20in%3A%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Fsharepoint%2Fsp-dev-list-formatting%2Ftree%2Fmaster%2Fcolumn-samples%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fgithub.com%2Fsharepoint%2Fsp-dev-list-formatting%2Ftree%2Fmaster%2Fcolumn-samples%3C%2FA%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ESee%20the%20also%3A%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fsharepoint%2Fdev%2Fdeclarative-customization%2Fcolumn-formatting%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fsharepoint%2Fdev%2Fdeclarative-customization%2Fcolumn-formatting%3C%2FA%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20hope%20this%20helps%20you%20%3A)%3C%2Fimg%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
Contributor

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

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 :)

 

 

 

@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?

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

 

likert.png

 

Rob
Los Gallardos
Microsoft Power Automate Community Super User

@RobElliott   oh how I would love to.  My organization has not released it to us yet.