WP Manifestindependent plugin directory
manifest / forms / random-number-generator-elementor-form

Random Number Generator Elementor Form

Generate random numbers that can be inserted into Elementor forms via shortcode, dynamic tags, or hidden fields.

★ 0stars

Install

Download source zip No release zip yet

This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.

Install straight from GitHub with WP-CLI:

wp plugin install https://github.com/dackzui/random-number-generator-elementor-form/archive/refs/heads/main.zip
No built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.

A WordPress plugin that generates random numbers for use in Elementor forms. This plugin uses unique naming to avoid conflicts with other random number generator plugins.

Installation

  1. Upload the random-number-generator-elementor-form folder to the /wp-content/plugins/ directory
  2. Activate the plugin through the 'Plugins' menu in WordPress
  3. Go to Settings > Random Number Elementor to configure default settings

Usage Methods

Method 1: Shortcode (Easiest)

Use the [random_number_elementor] shortcode anywhere in your Elementor forms or text fields.

Basic Usage:

[random_number_elementor]

With Parameters:

[random_number_elementor min="1000" max="9999"]
[random_number_elementor min="1" max="100" prefix="ID-"]
[random_number_elementor min="1" max="999999" length="6"]
[random_number_elementor min="1" max="100" decimals="2"]

Available Parameters:

  • min - Minimum value (default: 1)
  • max - Maximum value (default: 999999)
  • prefix - Text before the number (e.g., "ID-", "REF-")
  • suffix - Text after the number
  • decimals - Number of decimal places (0 for integers)
  • length - Fixed length with zero padding (e.g., length="6" produces 000123)

Examples:

  • [random_number_elementor min="1000" max="9999"] → 5847
  • [random_number_elementor min="1" max="100" prefix="ID-"] → ID-42
  • [random_number_elementor min="1" max="999999" length="6"] → 000123
  • [random_number_elementor min="1" max="100" decimals="2"] → 45.67

Method 2: Elementor Dynamic Tags (Recommended)

  1. In your Elementor form, click on a field (text, hidden, etc.)
  2. Click the Dynamic Tags icon (looks like a database/stack icon)
  3. Navigate to the "Site" category
  4. Select "Random Number Elementor"
  5. Configure the settings in the Dynamic Tag panel:
    • Minimum Value
    • Maximum Value
    • Prefix
    • Suffix
    • Decimal Places
    • Fixed Length

Method 3: CSS Class with JavaScript

Add a hidden field to your Elementor form and give it the CSS class rngef-field along with data attributes:

In Elementor:

  1. Add a Hidden field to your form
  2. Set the CSS Class to: rngef-field
  3. Add Advanced > Attributes:
    • data-rngef-min = "1"
    • data-rngef-max = "9999"
    • data-rngef-prefix = "REF-"
    • data-rngef-suffix = ""
    • data-rngef-length = "6" (optional)

The JavaScript will automatically populate this field when the form loads.

Use Cases

Reference Numbers

Generate unique reference numbers for form submissions:

[random_number_elementor min="100000" max="999999" prefix="REF-"]

Result: REF-584729

Order IDs

Create order or ticket IDs:

[random_number_elementor min="1" max="999999" length="8" prefix="ORD-"]

Result: ORD-00012345

Coupon Codes

Generate random discount codes:

[random_number_elementor min="1000" max="9999" prefix="SAVE-"]

Result: SAVE-7842

Invoice Numbers

Create invoice numbers with year prefix:

[random_number_elementor min="10000" max="99999" prefix="2025-"]

Result: 2025-45678

Settings

Navigate to Settings > Random Number Elementor in WordPress to configure:

  • Default Minimum Value
  • Default Maximum Value
  • Default Prefix
  • Default Suffix
  • Default Decimal Places

These settings will be used as defaults when shortcode parameters are not specified.

Unique Naming

This plugin uses unique identifiers to avoid conflicts:

  • Shortcode: [random_number_elementor]
  • CSS Class: rngef-field
  • Dynamic Tag: "Random Number Elementor"
  • Settings Page: "Random Number Elementor"

Tips

  1. Unique Numbers: While the plugin generates random numbers, it doesn't guarantee uniqueness across submissions. For truly unique IDs, combine with timestamps or use a custom solution.

  2. Hidden Fields: For reference numbers that users don't need to see, use Elementor's Hidden field type with the shortcode or dynamic tag.

  3. Form Confirmation: Use the random number in your form confirmation message by referencing the field name, e.g., "Your reference number is [field id="reference_number"]"

  4. Email Notifications: Include the random number in email notifications to users for tracking purposes.

Browser Compatibility

This plugin works in all modern browsers and is fully compatible with Elementor 3.0+.

Support

For issues or feature requests, please contact your developer or submit through your support channel.

Version History

1.0.0

  • Initial release
  • Shortcode support with unique naming
  • Elementor Dynamic Tags integration
  • JavaScript-based field population
  • Admin settings page
  • Conflict-free naming convention