Forum Discussion

gsr51's avatar
gsr51
Copper Contributor
Dec 14, 2023

Customize form using JSON to prevent a field from wrapping

Is there a way to prevent a specific text field from wrapping using the customize forms with JSON? See below where the email address is wrapping.  I'd like to stop that from happening. 

 

 

Thanks,

-Greg

 

  • You can try to do some formatting embeding HTML code in the JSON code...it will require some tests from your side
  • gsr51 Try applying JSON column formatting for your email column. Use JSON like: 

     

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

    Steps to apply column formatting at: Get started with SharePoint JSON column formatting 

     


    Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.

Resources