You can use the applyEdits method of the FeatureLayer to do this. I am writing an application where I am just changing the attributes of selected features. Since I'm allowing the user to make changes to the attributes of multiple features (featureSet), I'm not using the AttributeInspector, but a custom dialog where the user can select specific attributes from comboBoxes.
array.forEach(featureSet, function (feature) {
feature.attributes.Priority = registry.byId('cboPriority').get("value");
feature.attributes.Management = registry.byId('cboManagement').get("value");
feature.attributes.Criteria = registry.byId('cboCriteria').get("value");
});
layerFeatureLayer.applyEdits(null, featureSet, null, function () { console.log("Features updated!"); }, function (error) { console.log("Features not updated! ", error); });
In your case, you would use the first parameter of the applyEdits method to add a new feature. You would have to handle the geometry of the feature and make sure its attributes are set.