cancelling on load actions

cancelling on load actions

I have written a short 'on load' action which alters the value of a field in another form. If I 'cancel' the action the altered value in the other form remains altered.

Is there a script that can run 'on cancel' to put things back to where they were?