The following fields display in a popup box when the user clicks on them. How do I get the editor form to appear instead?:
infoTemplate: {
title: '<b>Request ${objectid}</b>',
content: '<span class="infoTemplateContentRowLabel">Date: </span>' +
'<span class="infoTemplateContentRowItem">${requestdate:DateFormat}</span><br><span class="infoTemplateContentRowLabel">Phone: </span>' +
'<span class="infoTemplateContentRowItem">${phone:formatPhoneNumber}</span><br><span class="infoTemplateContentRowLabel">Name: </span>' +
'<span class="infoTemplateContentRowItem">${name}</span><br><span class="infoTemplateContentRowLabel">Severity: </span>' +
'<span class="infoTemplateContentRowItem">${severity:severityDomainLookup}</span><br><span class="infoTemplateContentRowLabel">Type: </span>' +
'<span class="infoTemplateContentRowItem">${requesttype:requestTypeDomainLookup}</span><br><span class="infoTemplateContentRowLabel">Comments: </span>' +
'<span class="infoTemplateContentRowItem">${comment}</span>'
}
};
The form startup is I believe, the following, but I am not sure:
// initialize the request type drop down
var initAttributeForm = function() {
var options = [];
for (var key in app.requestTypeFieldDomainCodedValuesDict) {
if (app.requestTypeFieldDomainCodedValuesDict.hasOwnProperty(key)) {
options.push('<option value="' + key + '">' + app.requestTypeFieldDomainCodedValuesDict[key] + '</option>');
}
}
app.requestTypeSelect.innerHTML = options.join('');
};
Here is the app online: csergent45/streetSigns · GitHub
Kelly Hutchins or Robert Scheitlin, GISP is it possible to use this:
layer.on("click", function(evt) {
event.stop(evt);
if (evt.ctrlKey === true || evt.metaKey === true) { //delete feature if ctrl key is depressed
layer.applyEdits(null,null,[evt.graphic]);
currentLayer = this;
editToolbar.deactivate();
editingEnabled=false;
}
});
});
but instead use the startCaptureRequest function like so. but this did not work. I was hoping to pull up the form. Wait, I need an edit form too, don't I? Not just a submit form? :
layer.on("click", function(evt) {
// temporarily show alert when starting edits
// and then start listening for a map click
var startCaptureRequest = function (severity) {
var listener;
// NOTE: once user has clicked 'x' to dismiss
// this alert, it will no longer show up
domStyle.set(app.startEditAlert, 'display', '');
setTimeout(function () {
domStyle.set(app.startEditAlert, 'display', 'none');
}, 3000);
// save map point in app global and
app.currentSeverity = severity;
listener = app.map.on('click', function (e) {
listener.remove();
// save map point in app global and
// show form to collect incident report
app.currentGeometry = e.mapPoint;
app.attributesModal.modal('show');
});
};
}
Here is my app that I published online. I am trying to make it so I can edit the points: Street Signs