Auto Coupon Generate for Gravity Forms
Auto Coupon Generate for Gravity Forms lets you automatically create a unique discount coupon code every time a visitor submits a Gravity Form. The generated code is saved directly as a Gravity Forms coupon and can optionally be emailed to the user straight away – no manual work required. A common use case is a two-step flow: a user fills out a registration or survey form, receives a unique coupon code by email, and then uses it on a subsequent order form to claim their discount. Key Features Automatically generates a unique, random coupon code on every form submission. Coupon codes are saved directly to the Gravity Forms Coupons Add-On – no extra steps needed. Configurable code length, character set, and optional prefix so codes match your brand. Supports both flat (fixed amount) and percentage discount types. Set a minimum order value that must be met before the coupon applies. Control how many times each coupon can be used in total. Optional start date and expiration date for time-limited promotions. Built-in email notification – send the generated coupon code to the user’s email address automatically after submission. The email subject and body are fully customisable, and you can use the {coupon_code} placeholder anywhere in the message body. Coupon Log page in the WordPress admin showing a full history of every coupon generated, including the code, the form it came from, and the date it was created. Shipping is excluded from discount calculations by default – the discount applies to the order subtotal only. Secure: uses random_int() for cryptographically safe code generation, proper nonce verification, and capability checks on all admin pages. Requirements WordPress 5.2 or higher PHP 7.0 or higher Gravity Forms (any recent version) Gravity Forms Coupons Add-On (must be installed and active) The plugin will check for these dependencies on activation and will not activate if either Gravity Forms or the Coupons Add-On is missing. Configuration After activating the plugin, go to Generate Coupon Setting in the WordPress admin menu. The settings page is divided into three sections. Coupon Generate Form Settings These settings control how coupon codes are generated and what discount they carry. Form ID – The ID of the Gravity Form that will trigger coupon generation on submission. To find your form ID, go to Forms in your WordPress admin; the ID is shown in the form list. Coupon Field ID – The ID of the field inside that form where the generated coupon code will be pre-populated (using the gform_field_value_uuid filter). This is typically a hidden field. Coupon Length – The number of random characters in the coupon code (not counting any prefix). For example, a length of 8 with the prefix SALE- would produce codes like SALE-A3BX92KQ. Coupon Code Prefix – Optional text to prepend to every generated code (e.g. SUMMER-). Leave blank for no prefix. Coupon Code Characters – The pool of characters used when generating the random part of the code. The default is 1234567890QWERTYUIOPASDFGHJKLZXCVBNM. You can narrow this down – for example, removing easily confused characters like 0, O, 1, and I. Discount Type – Choose Percentage to deduct a percentage of the order total, or Flat to deduct a fixed amount. Discount Amount – The value of the discount. If Discount Type is Percentage, enter a number between 1 and 100. If Discount Type is Flat, enter the currency amount (e.g. 10 for $10 off). Max Usage – The maximum number of times the generated coupon can be used across all customers. Enter 1 to make it single-use. Minimum Price – The minimum order subtotal (excluding shipping) a customer must reach before the coupon becomes valid. Leave blank for no minimum. Start Date – The date from which the coupon becomes valid, in MM/DD/YYYY format. Leave blank to make it valid immediately. Expiration Date – The date on which the coupon expires, in MM/DD/YYYY format. Leave blank for no expiry. Coupon Usage Form Settings Form ID – The ID of the Gravity Form where customers will enter and apply their coupon code (your checkout or order form). The generated coupon will be scoped to this form inside the Gravity Forms Coupons Add-On. Email Notification Settings These settings are all optional. If you do not enable email notifications, coupons are still generated and saved – users just will not receive an automatic email. Email Field ID – The ID of the field in the coupon-generate form that holds the user’s email address. The plugin will read the submitted value from this field and send the notification to that address. Email Subject – The subject line of the notification email. Default: Your Coupon Code. Email Body – The body of the notification email. Use the placeholder {coupon_code} anywhere in the text and it will be replaced with the actual generated code before sending. Default message is provided but you can customise it freely. Enable Email – Check this box to activate automatic email sending. When unchecked, no email is sent regardless of the other email settings. The email is sent using WordPress’s built-in wp_mail() function. Delivery depends on your server’s mail configuration or any SMTP plugin you have installed. Coupon Log Go to Generate Coupon Setting > Coupon Log in the WordPress admin to see a table of every coupon that has been generated by the plugin. The table shows the coupon code, the form it was generated from, and the date and time it was created. The log displays the 100 most recent entries in reverse chronological order.
Top keywords
- coupon36×3.94%
- code20×2.19%
- email18×1.97%
- form18×1.97%
- coupon code13×1.42%
- generated12×1.31%
- discount11×1.20%
- gravity10×1.09%
- id10×1.09%
- date8×0.88%
- forms8×0.88%
- field7×0.77%
UpdraftPlus
The UpdraftPlus Backup & Migration Plugin is trusted by the WordPress community to backup, restore and migrate their WordPress websites. UpdraftPlus is actively installed on more than 3 million websites around the world. Backup with UpdraftPlus UpdraftPlus is the world’s highest ranking and most popular scheduled backup and migration plugin. Backup to your preferred storage location and restore in just three clicks. Backup to Dropbox, Google Drive, Amazon S3 (or compatible), Rackspace Cloud, FTP, DreamObjects, Openstack Swift or email. The paid version also allows you to backup to Microsoft OneDrive, Microsoft Azure, Google Cloud, Backblaze B2, SFTP, SCP, pCloud, WebDAV or UpdraftVault, our integrated storage option for UpdraftPlus. Backup manually or schedule to run every 2, 4, 8 or 12 hours, daily, weekly, monthly or fortnightly. Restore with UpdraftPlus Your WordPress website is vulnerable. Your site may get hacked. Something could go wrong with an update or your server could crash. You might need to reverse a change made or a mistake caused by human error. Whatever the reason, you can restore your WordPress website in just a few clicks with UpdraftPlus. Choose which components to restore (e.g. plugins, themes, database etc.), click again to restore, then click again to return to the main screen. Migrate with UpdraftPlus It’s easy to migrate your WordPress website to another web host, server or domain with this free version of UpdraftPlus. To migrate, simply download your database, plugins, themes etc. from the source site, then upload them into your destination site. When migrating, a built-in search-and-replace engine identifies old strings and replaces these to reflect the new location. UpdraftPlus saves you time and reduces the risk of broken links or missing files associated with manual migrations. Why UpdraftPlus? Writing a reliable backup and migration plugin that ‘just works’ consistently across millions of different WordPress deployments is hard. UpdraftPlus is relied upon to do exactly that. We’re trusted and actively deployed on more websites around the world than any other WordPress backup and migration plugin. UpdraftPlus: Backs up, migrates and restores Offers a huge number of remote storage locations Allows you to schedule backups, so you can ‘set and forget’ Is comprehensive and easy to use Is proven to work on over 3 million sites. UpdraftPlus Premium The free version of UpdraftPlus will back up and migrate your website perfectly well. However if you need more features and options you can purchase our Premium version. Backup and Migrate with UpdraftPlus Premium, and: Get automatic backups before updates. Restore the very latest version if a WordPress or plugin update breaks your site. Backup Incrementally. Changes are added to the master, saving server resources vs repeatedly backing up in full. Get more remote storage options including Microsoft OneDrive, SFTP, Microsoft Azure, WebDAV, Google Cloud, SCP, Backblaze and pCloud. Get 1GB of integrated storage with UpdraftVault for 99.999% reliability, redundancy and scalability. Get more control over how many backups are stored in a specified interval. Restore from other backup plugins including BackWPup, BackupWordPress, Simple Backups and more. Run backups at set times e.g. during periods of low traffic. Backup to more than one location for added protection. Get detailed reports. Includes cryptographic checksums so you can verify the integrity of the backup files and more. Get Premium migration. Migrating to the destination site is more direct and can be done from the source site. Get Multisite / multi-network compatibility. Backup non-WP files and databases e.g. tables belonging to your e-commerce store or customisations to WordPress core. Get database encryption. Manage your backups and migrations from the WP-CLI. Get Premium Support. Find out more on our comparison page. UpdraftPlus Premium is available for purchase here. Managing multiple websites? UpdraftCentral is a powerful remote control dashboard for WordPress that allows you to manage your backups, as well as updates, users, pages, posts, plugins and themes from one central location. Choose between: UpdraftCentral (free, self-hosted) UpdraftCentral Premium (paid-for, self-hosted) UpdraftCentral Cloud (paid-for, fully-hosted) Optimize your sites centrally by combining the power of WP-Optimize and UpdraftCentral or manage your backups centrally by combining the power of UpdraftPlus with UpdraftCentral. Need to create a temporary clone of your site? UpdraftClone makes it quick and easy to create a temporary sandbox for changes you want to try out. Simply select the versions of WordPress and PHP that you want, and we’ll do the rest. More about UpdraftClone The full suite of plugins from Team Updraft and friends UpdraftPlus. Backup, migrate and restore. Rated 5* on the plugin directory and trusted by more than 3 million WordPress website owner WP-Optimize. Clean the database, compress images and caching. Optimize your WordPress website. 5* user rating. 1 million + active installs. All-In-One Security (AIOS). Secure your WordPress website. Comprehensive, feature rich and easy to use. 5* user rating and 1 million + active installs. WP Overnight. Quality Extensions for your WooCommerce store. 5* rated invoicing, order and product management, customer management solutions and more. Easy Updates Manager. Take control of updates. Lots of features for free, and a Premium version with even more – over 300,000 users. Internal Link Juicer.Boost your SEO. Automate internal links within your WordPress website. Save time and rank higher in the search engines. For other useful, free plugins see our lead developer’s profile, here. Are you multilingual? Can you translate? Do you want to help people that speak your language to backup, migrate and restore their WordPress websites? The UpdraftPlus backup, migration and restoration plugin is ready and waiting. The translation process is easy, and web-based – please go here for instructions: https://updraftplus.com/translate/. Or, if you’re already an expert WordPress translator, just pick out the .pot file from the wp-content/plugins/updraftplus/languages/ directory – if you scan for translatable strings manually, then you need to get these functions: _x(), __(), _e(), _ex(), log_e(). Many thanks to our existing translators. License Copyright 2011-24 David Anderson This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Non-English translators are provided by volunteers, and wordpress.org does not give plugin developers control over their translations; thus relying on them is at your own risk; UpdraftPlus cannot guarantee that translations from the original English are accurate. We recognise and thank those mentioned at https://updraftplus.com/acknowledgements/ for code and/or libraries used and/or modified under the terms of their open source licences.