Create telephone number hyperlink in Arcgis JS Api 3.19 popup

1069
3
Jump to solution
02-10-2017 12:02 PM
by Anonymous User
Not applicable

Hi all,

I am trying to recreate this phone link example (fake number of course) from AGOL into ArcGIS JS 3.19 How can I make that field a hyperlink that people can click on?

Tags (1)
0 Kudos
1 Solution

Accepted Solutions
JeffJacobson
Occasional Contributor III
3 Replies
JeffJacobson
Occasional Contributor III
by Anonymous User
Not applicable

So how would it be in my popup:

that field is the one i want to add a number hyperlink: fieldName: "Public_Contact",

 var template = new PopupTemplate({
            title: "Road Status",
            fieldInfos: [{
            fieldName: "BLOCKNM",
            visible: true,
            label: "Road Status:"
            }, {
            fieldName: "FULLCLOSE",
            visible: true,
            label: "Full Closure:"
            }, {
            fieldName: "LOCDESC",
            visible: true,
            label: "Location:"
            }, {
            fieldName: "STARTDATE:DateFormat(selector: 'date', fullYear: true)",
            visible: true,
            label: "Starts:"
            },
            {
            fieldName: "Estimated_End",
            visible: true,
            label: "Estimated End Date:"
            },
            {
            fieldName: "tel:Public_Contact",
            visible: true,
            label: "Public Contact Information:"
            },
            {
            fieldName: "EditDate",
            visible: true,
            label: "Last Updated:"
            }],
            mediaInfos: [{
            "title": "Image",
            "caption": "",
            "type": "image",
            "value": {
            "sourceURL": "{Picture}",
            "linkURL": "{Picture}"
          }
          }]
          });‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍
0 Kudos
SteveCole
Frequent Contributor

Here's more of an explanation for what Jeff was saying. Basically, you'll need to code a content function for your infoWindow and build an <a> link inside of it using the format Jeff provided.

0 Kudos