Hi Sam,
Here are the approaches:
Create a custom data object, with email address, the code (promo code) and the counter. Once this is done.
For requirements in #2,
2. Have a custom data object lookup script on the page where the form is. When they submit the form, the script looks up the empty data card (which is missing email address, and then assign an email address the contact/visitor submits the form. Add a processing step in the form, where you are not only saving the contact details, but update the data card with contact's email address, meaning it is tied/used for this contact. Also add a step now where you can send these contacts to program builder or data card, where you are then looking up a data card for the contact, which is now linked, populate the email field of promo code and send the email. This way now you are able to send 1 promo code to contact based on the form submission.
1. For the solution in scenario 1, (now you can also do this for scenario 2 as well) You can have the campaign contact, sent to your system, and bring them back with the promo code. The best solution (which now I realized that we used to tie contacts to promo codes manually in the past) would be to build a cloud connector, where you can send contacts via cloud connector/app and then have them come back with promo code(s) and send them the email. (you would need to pass, campaign ID, number of promo codes required, contact's email address via cloud connector.
I hope these options give you few details to think about. Definately talk to Eloqua technical team for any details you need. But, both of these approaches will work for you based on what you are looking for.
Hope this helps.
Thanks
Amit