0

I need to know how I can create a string with the following appearance: "For further questions please contact [email protected]". I want to format it with a JSON in the SharePoint Online.

Here is my code so far:

{
"elmType": "div",
"style": {
    "width": "100%",
    "text-align": "left",
    "overflow": "hidden",
    "border-top-width": "1px"
},
"children": [
    {
        "elmType": "div",
        "style": {
            "height": "15px",
            "width": "100%",
            "color": "#fff",
            "font-size": "13px",
            "border-top": "5px solid #eee",
            "background-color": "#F66F6F",
            "padding": "10px"
        },
        "children": [
            {
                "elmType": "a",
                "txtContent": "Test",
    "attributes": {
        "href": {
            "operator": "+",
            "operands": [
                "mailto:",
                "[$Email]",
                "?subject=Task status"
                
                        ]
                }
                }
                
                }

        ]

     }

 ]
}

I only get a hyperlink, but without the text before that.

I hope you can help me.

Best regards

Matthias

1 Answer 1

1

I tried to modify your code for testing .You can use the following JSON to create a text in the footer.

Full code:

{
"elmType": "div",
"style": {
    "width": "100%",
    "text-align": "left",
    "overflow": "hidden",
    "border-top-width": "1px"
},
"children": [
    {
        "elmType": "div",
        "style": {
            "height": "15px",
            "width": "100%",
            "color": "#fff",
            "font-size": "13px",
            "border-top": "5px solid #eee",
            "background-color": "#F66F6F",
            "padding": "10px"
        },
        "children": [
         {
              "elmType": "a",
                "txtContent": "For further questions please contact "
         },
            {
                "elmType": "a",
                "txtContent": "[email protected]",
    "attributes": {
        "href": {
            "operator": "+",
            "operands": [
                "mailto:",
                "[$Email]",
                "?subject=Task status"
                
                        ]
                }
                }
                
                }

        ]

     }

 ]
}

Screenshot of test results: enter image description here

Best regards,

Zella Zhang

1
  • Hi Matthias, I am checking to see if the problem has been resolved. If you have any questions or progress, you can contact me in time.
    – Zella_msft
    Commented May 16, 2022 at 8:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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