AnsweredAssumed Answered

Custom Popup Actions with Form Element in JS API 4.X

Question asked by jay.gregory on Aug 23, 2017

I'm using the JS 4.x API, and pushing a custom action to the popups via the well documented example.  However, I would like the custom action to contain a form element.  This was possible in the 3.x version of the API (see attached image for example).  However in the 4.x version I'm unsure how this would work.  I've tried: 

 

var setCircleCenterAction = {
   title: "Set search center at <input type='number' id='radius-small' size='40' value=20 min='0' max='100' /> miles",
   id: "set-circle-center",
   className: "glyphicon glyphicon-ok-sign"
};
mapView.popup.actions.push(setCircleCenterAction);
mapView.popup.on('trigger-action', function(event) {
   console.log(event);
});

 

But it doesn't produce the desired results - the title attribute is interpreted as text instead of HTML.  Is there any way around this?

Attachments

Outcomes