Adds getData method for edit action