Select to view content in your preferred language

Help with Popups with attributes containing a URL

604
2
Jump to solution
07-14-2023 05:14 PM
DavidHood_USFS
Occasional Contributor

I'm trying to create a custom popup but I'm having issues with one of my fields that contains a URL.  I've tried adding the field to a text popup, but it returns the field value, but the link is broken.

If I pull up the record in ArcGIS Pro and copy the value, I get:

Reserve a site&nbsp;by visiting <strong><a href="https://www.recreation.gov/camping/campgrounds/234288">Recreation.gov</a></strong> or by calling Toll Free 1-877-444-6777 (International 518-885-3639 or TDD 877-833-6777).&nbsp;

If I add the field to a text element of the popup it returns the text with a broken link, but the field in the fields list returns the link with a working link. 

DavidHood_USFS_0-1689378597018.png

I do not have the ability to edit this data, but I'm also open to using an arcade expression to extract just the URL and recreate this for the popup.

Tags (2)
0 Kudos
1 Solution

Accepted Solutions
JohannesLindner
MVP Frequent Contributor

The text element has two modes.

The first mode is a "what-you-see-is-what-you-get" editor. This will not interpret HTML (You can see that it didn't only "break" your link, it also didn't interpret the strong tag or the &nbsp; entities). You can write your text in here and then create the link with the editor tools.

JohannesLindner_0-1689403603845.png

 

 

Or you can switch to HTML mode. This mode is an HTML editor. It will interpret HTML code put into it (a small subset anyway).

JohannesLindner_1-1689403664030.png

JohannesLindner_2-1689403707238.png

 


Have a great day!
Johannes

View solution in original post

0 Kudos
2 Replies
JohannesLindner
MVP Frequent Contributor

The text element has two modes.

The first mode is a "what-you-see-is-what-you-get" editor. This will not interpret HTML (You can see that it didn't only "break" your link, it also didn't interpret the strong tag or the &nbsp; entities). You can write your text in here and then create the link with the editor tools.

JohannesLindner_0-1689403603845.png

 

 

Or you can switch to HTML mode. This mode is an HTML editor. It will interpret HTML code put into it (a small subset anyway).

JohannesLindner_1-1689403664030.png

JohannesLindner_2-1689403707238.png

 


Have a great day!
Johannes
0 Kudos
DavidHood_USFS
Occasional Contributor

Thanks Johannes, so it's as I suspected.  Unfortunately this is a corporate dataset and I can't change the attribute values which contain the html link already built, so I'll have to go figure out how to extract the URL and rebuild it manually with Arcade.

0 Kudos