Liz,I think the easiest option would be to disable the attribute inspector's delete button by setting showDeleteButton to true: var layerInfo = [{
'featureLayer': results[0].layer,
'showAttachments':true,
'showDeleteButton':false,
'isEditable':true,
'fieldInfos':[
{'fieldName':'requesttype','label':'Type','isEditable':true},
{'fieldName':'address_num','label':'Issue Address #','isEditable':true},
{'fieldName':'streetname','label':'Issue Street Name','tooltip': 'Start typing the street name for the list to populate','isEditable':true},
{'fieldName':'email','label':'Contact Info','isEditable':true},
{'fieldName':'comment','label':'Comments','isEditable':true,'stringFieldOption':esri.dijit.AttributeInspector.STRING_FIELD_OPTION_TEXTAREA}
]
}];
Then add a jquery mobile button to the attribute inspector dialog and style this to suit your needs. When users click this new delete button you can use featureLayer.applyEdits to delete the current feature. Here's an example of code you could add to the delete button's onclick event function deleteFeature(){
var graphics = citizenRequestLayer.getSelectedFeatures();
if(graphics.length > 0){
//remove any features
citizenRequestLayer.applyEdits(null,null,graphics,function(){
console.log('Features deleted');
$.mobile.changePage("#mapPage",null,true,true);
});
}
}
And here's an example of adding the jquery button. <div data-role="page" id="attributeDialog" data-theme="c">
<div data-role="header" data-backbtn="false">
<h1>Report</h1>
</div>
<div data-role="content" data-inset="true">
<!--<center><h6>(Please use the delete button to restart if the estimated location is incorrect)</h6></center>-->
<div>
Estimated Location:
<div id="currentAddress" title="Estimated Location" style="font-weight:bold;text-align:center;width:100%;"></div>
</div>
<br>
<a href="#" data-role="button" onclick="deleteFeature();" data-inline='true'>Delete</a>
<br>
<div id="attributeDiv"></div>
<br>
<a href="http://gis.manchesterct.gov/MObile/IssueRequests.html" onclick="alertsubmit();" data-role="button">Finish</a>
</div>
</div>