Have a custom WAB app with a popup that provides a link for user to click on. This link brings them to a Survey123 form. Instead of opening up a new browser tab, I'm considering using the iFrame option to display the form in window.
Something like this:
map.infoWindow.setContent('<iframe width="100%" height="1000"></iframe>');
Ideas welcomes.
Thanks,
Joe
Joe,
In the current security context of modern browsers placing things in iframes has gotten much more difficult and I would advise against it.
Can you suggest another option? Would you recommend the X Frame option?
Joe,
Keep it in a new tab. X-Frame options are security policies/rules for iframes.
I wanted to remove the 2nd tab so users stay on the same tab. Are there any other options code wise?
Would replacing the contents of the current tab with the survey work for you. If not then no, nothing I can think of.
Yes but I would need to test this first. How would I go about such a process?
Set the link you are using to open the new to to have a target property of "_self"
map.infoWindow.setContent('<a href="https://survey123.arcgis.com/share/xyz123?center='+ evt.mapPoint.getLatitude().toString() + ','+ evt.mapPoint.getLongitude().toString() + '&field:Floor_Selection=' + this.SERVICE_ID.split(']')[1] + '" target="_self"><font size="4">Click here to submit a service request</font></a>');
didn't seem to work
Try "_parent"