How to modify form calculations before deleting certain fields on the form