Is it possible to have an AMPscript function only execute following the submission of a form?
For example, we have a Web Collect code that is unsubscribing a user from a list through Web Collect functionality. Ideally, we want to update a field in a Data Extension at the same time - but this will only be reflected once they've submitted their subscriber / unsubscribe status. How can I make sure that the Data Extension is only updated after they've submitted, as opposed to running once the page is loaded?
I've tried moving the function into a javascript function that is called after the submit, but it is still running once the form is loaded. I also cannot think of any AMPscript variable I can use to create an ELSE/IF statement that would help.
Any help is appreciated, thanks.