You should move your scripts to client-side. It's ...
# suitescript
l
You should move your scripts to client-side. It's a more applicable approach to your use case since you're removing the lines once the form reaches the client.