Forms that turn off after set number of submissions

We do free product giveaways, but we only have a set number of free products to give away. We would like to be able to set a form to turn off when it reaches a set number of submissions. It would be great if it could then default to a Thank You page that let people know the free products have run out but that they can sign up for our newsletter to be notified when the next giveaway is coming next.

HubSpot updates