Need 2 links in a one custom popup

103
2
Jump to solution
08-30-2019 12:46 PM
joerodmey
MVP Regular Contributor

In web app builder I'm building an app that allows for clicks on a map and custom popup to show. I'm trying to add a second link to my popup but it appears like its adding as one long line. How can I split the one line into 2 separate lines in the one popup. Below I've included what I have so far in my MapManager.js within publishMapEvent

Thanks

map.infoWindow.setContent('<a href="https://survey123.arcgis.com/share/ID?center='+ evt.mapPoint.getLatitude().toString() + ','+ evt.mapPoint.getLongitude().toString() + '&field:Floor_Selection=' + this.SERVICE_ID.split('_')[1]+"_Floor " + '" target="_"><font size="4">Click here to submit 1</font></a>' + '<a href="https://survey123.arcgis.com/share/ID?center='+ evt.mapPoint.getLatitude().toString() + ','+ evt.mapPoint.getLongitude().toString() + '" target="_"><font size="4"> Click here to submit 2 </font></a>');
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Esteemed Contributor

Joe,

   You should try adding a br element in between your two anchor elements (and I think you had an issue with your single and double quotes).

map.infoWindow.setContent('<a href="https://survey123.arcgis.com/share/ID?center='+ evt.mapPoint.getLatitude().toString() + ',' + evt.mapPoint.getLongitude().toString() + '&field:Floor_Selection=' + this.SERVICE_ID.split('_')[1] + '_Floor' + '" target="_"><font size="4">Click here to submit 1</font></a><br><a href="https://survey123.arcgis.com/share/ID?center='+ evt.mapPoint.getLatitude().toString() + ','+ evt.mapPoint.getLongitude().toString() + '" target="_"><font size="4"> Click here to submit 2 </font></a>');‍‍

View solution in original post

2 Replies
RobertScheitlin__GISP
MVP Esteemed Contributor

Joe,

   You should try adding a br element in between your two anchor elements (and I think you had an issue with your single and double quotes).

map.infoWindow.setContent('<a href="https://survey123.arcgis.com/share/ID?center='+ evt.mapPoint.getLatitude().toString() + ',' + evt.mapPoint.getLongitude().toString() + '&field:Floor_Selection=' + this.SERVICE_ID.split('_')[1] + '_Floor' + '" target="_"><font size="4">Click here to submit 1</font></a><br><a href="https://survey123.arcgis.com/share/ID?center='+ evt.mapPoint.getLatitude().toString() + ','+ evt.mapPoint.getLongitude().toString() + '" target="_"><font size="4"> Click here to submit 2 </font></a>');‍‍

View solution in original post

joerodmey
MVP Regular Contributor

Thanks it worked!

0 Kudos