The Attribute window that you see from the EditorWidget and TemplatePicker, is our FeatureDataForm. How the form looks like depends on the FeatureLayer. What you define as OutFields in your FeatureLayer, will be the fields displayed on the form. If your FeatureLayer comes from a MapService, then everything will be read-only. If your FeatureLayer comes from an editable FeatureService, then whatever type or settings the service had given its fields will also apply to the fields in the form. In other words, to ensure that your primary key field is not editable, you have to make that setting in the feature service.
You can however, create your own attribute window and exclude the primary key field in your form so you can update this attribute with your default value.