Note not displaying a custom url in web app

1254
3
Jump to solution
01-18-2021 04:37 PM
Todd
by
New Contributor III

I have three attributes, ${school_url}, and ${school_lat} and ${school_lon}. The current text is included in a 'hint' attribute in Connect: 

<br>Website: <a href="${school_url}">${school_url}</a></font><br>Map: <a href="https://www.google.com/maps/place/@${school_lat},${school_lon},17z">Google</a>

Website: ${school_url}
Map: Google

The mobile version displays properly and hyperlinks work great. However, in the web version I get the following:

Todd_1-1611016361648.png

I'm not sure what to add/remove to correct the display, removing the unnecessary items in the hyperlinks (for the the web version). 

Regards,
Todd
0 Kudos
1 Solution

Accepted Solutions
Todd
by
New Contributor III

Here's the fix... and the '<br>' tags are working in Edge. 

Todd_0-1611084190981.png

Todd_1-1611084253270.png

 

Regards,
Todd

View solution in original post

3 Replies
Alber_Verster
Esri Contributor

Hi Todd,

I would recommend that you use the Concat() function in the calculation field as the Survey123 webform can be problematic is these cases.

Once I inserted your HTML script into the calculation field, I was able to display the hyperlink correctly in both the Field app and the webform.

HyperlinkCalc.PNG

 

concat('<a href="',${school_url},'">',${school_url},'</a>')

concat('<a href=','"https://www.google.com/maps/place/@',${school_lat},${school_lon},',17z">Google</a>')



Alber_Verster_2-1611026272484.png

 

Hope this helps.

Regards

Alber

 

 

 

 

 

Todd
by
New Contributor III

@Alber_Verster worked kinda. You need an extra ',' included in the map url between the lat/lon.

 

concat('<a href=','"https://www.google.com/maps/place/@',${school_lat},',',${school_lon},',17z">Google</a>')

 

The only issue I still have is embedding the new concat-ed variables in my 'hint' attribute. Once I add them back it jacks it up.

Todd_1-1611073582801.png

I have several variables I'm adding as you can see and by using the <br> tags it cleans up the display (versus one variable as shown above).  I notice the extra space before the address string. Maybe I need to do a concat on the entire html string?

I'm testing using Edge and not sure how to have the html breaks <br> removed. Here is an example:

concat(${school_address_street},' ',${school_address_city},', ',${school_address_state}, '<br>',${school_address_county},' County')

Here is the result:

Todd_0-1611079631934.png

Hmmmmm....

Regards,
Todd
Todd
by
New Contributor III

Here's the fix... and the '<br>' tags are working in Edge. 

Todd_0-1611084190981.png

Todd_1-1611084253270.png

 

Regards,
Todd