Simple Raffle Plugin for WordPress – Auto Generate Codes, Export Data, GDPR Compliance

Plugin - WpScriptly

Raffle Plugin Summary

This custom WordPress Raffle Plugin was developed to meet the specific requirements of a client who needed a straightforward yet functional raffle system for their website. The plugin includes several key features that enhance its usability and functionality:

  1. User Entry and Raffle Code Generation:
    • Visitors can enter the raffle by providing their email address through a simple form.
    • Upon submission, the plugin auto-generates a unique 6-character alphanumeric raffle code.
    • The code is then emailed to the user, ensuring they have a record of their entry.
  2. Email Validation:
    • The plugin includes email validation to check if an email address has already been used for the raffle.
    • If an email address has been previously used, the user is notified and prevented from entering again, ensuring each entry is unique.
  3. Data Management and Export:
    • The plugin stores all entries, including email addresses and raffle codes, in the WordPress database.
    • Administrators can export the collected data in CSV format directly from the admin panel. This allows for easy data handling and analysis outside of WordPress.
  4. Admin Panel and Settings:
    • An intuitive admin panel is included, providing easy access to all raffle entries.
    • The admin panel features an option to randomly pick a winner from the entries.
    • A settings page is provided where administrators can control the status of the raffle, turning it on or off as needed.
    • Additionally, the settings allow the admin to enable or disable specific shortcodes (e.g., displaying the winning code or the GDPR compliance form).
  5. GDPR Compliance:
    • A GDPR compliance form is available, allowing users to request the deletion of their data from the raffle entries.
    • Users can enter their email address to have their data removed, ensuring the plugin adheres to data protection regulations.
  6. Custom Shortcodes:
    • [raffle_form]: Displays the form for users to enter the raffle.
    • [display_winner]: Displays the winning raffle code if one has been selected, with options to enable or disable this feature from the admin settings.
    • [raffle_gdpr]: Provides a form for users to delete their data, with options to enable or disable this feature from the admin settings.
  7. Styling and Customization:
    • The plugin includes custom CSS to ensure the input fields and buttons are styled consistently and are visually appealing.
    • Administrators can easily customize the button colors and text alignment through the included styles.
*Create 1 page or seperate pages and place the shortcodes in it or those pages.

[raffle_form]: Displays the form for users to enter the raffle.

[display_winner]: Displays the winning raffle code if one has been selected, with options to enable or disable this feature from the admin settings.

[raffle_gdpr]: Provides a form for users to delete their data, with options to enable or disable this feature from the admin settings.

Note:

If you need to have this plugin customized, please contact me. Alternatively, you must be familiar with advanced PHP and MySQL to make modifications yourself.

This plugin provides a comprehensive solution for running a raffle on a WordPress site, with features designed to streamline the entry process, manage data efficiently, and ensure compliance with data protection regulations. The admin panel and settings page offer flexibility and control, making it a valuable tool for any website looking to host a raffle.

Notes:

Wp Scriptly

This basic script, CSS style, and plugin are designed to function optimally assuming minimal interference from your theme or other plugins. If conflicts occur or further customization is needed, additional adjustments may be necessary. Please note that this script, CSS style, or plugin must be used AS IS.

Wp Scriptly

Newsletter signup

WpScriptly

Subscribe to my WpScriptly newsletter for WordPress tips, plugin tutorials, and exclusive updates—delivered straight to your inbox!

Comments: