Get email adress then popup delivers discount code

I need to create an email address sign up box on homepage. (JW Post office stack)
Am I right in thinking the only way to povide a discount code once the email address has been provided is to link auto response such as mail chimp? Is there any way that instead I could trigger a popup containing discount code? … upon sign up

You might be able to use Lookup for this - https://stacks4stacks.com/lookup/ - but @willwood will tell you for sure.

Rob

A popup window / modal that appears after the user submits the email signup form?

Yes! Is that a silly question!?

Does your email stack allow you to enter some Javascript code to run, after the form is submitted? If so, then that is where you can add your call to trigger TopBox and display the coupon code:

$('#myTopBoxID').click();

Or if you have the option to redirect to a “thank you” page, then append a query string onto the link and have QueryDisplay display a message box with the coupon code within:

?result=success

Hi Will! Hope all is going well over there.
Thanks so much for this answer. Gosh the redirect page may be the way to go, I’m usiuing Joe Workman postoffice stack … it does have a redirect on success. … So actually I can just redirect it to a secret page where the secret discount code is can’t I ?

If you want to just show content with Post Office you could just put it in a PO Box stack and set the ON Success Content to Show PO Box:2020-10-05_10-16-04

If the option exists, either redirect to another page link with the coupon code on it:

https://example.com/coupon-success/

Or perhaps just redirect back to the current page the email form stack is on, but have a query string on the address:

?result=success

Then use my QueryDisplay stack to display whatever you want.

Triggering a popup window with the coupon code displayed within might be more difficult, depending on the architecture of the stack. It can be done with some of my stacks, in the format of a callback event. But it would rely on your email form stack having a box to enter the code within.

Basically when the form is submitted, this extra code can run. In this case, the code could open a popup window, displaying your coupon code.

One thing you have not said is whether each customer needs to see a unique coupon code, or whether they all share the same coupon code.

You might also need to get yourself a copy of GrabCode, so that users can easily copy the coupon code, if they are to reuse it on your website. Probably not a good idea to rely on people manually copying and pasting coupon codes, because they are likely to cut bits off or append extra stuff on (like spaces or other content) which will undoubtedly cause a lot of problems and aggravation later on!