update loadEditForm function