How to Pre-Fill WordPress Forms Using QR Codes & URL Parameters

Running an event, campaign, or managing multiple sales reps? You can automatically fill form fields by using QR codes linked with URL parameters—making lead tracking seamless and attribution automatic. This approach works beautifully with popular WordPress form plugins like Gravity Forms, WPForms, and Ninja Forms.

 

Issue Background

Imagine this: Your team is out in the field distributing flyers with QR codes. Each QR code should lead to a contact form, pre-filled with the name of the rep who gave it to the lead. That way, no manual data entry—and every lead is attributed to the right person or campaign.

Example link behind the QR code:
 https://yoursite.com/offer/?salesperson=Alex%20Smith

When the prospect scans the code, the salesperson’s name appears in a hidden field. Neat, right?

How It Works

  • URL parameters carry hidden data from the QR code directly into the form.
  • That data pre-fills a field on the form—visible or hidden
  • When the form is submitted, the lead is automatically assigned to the correct sales rep or campaign.

Resolution Steps

Step 1: Create a Hidden Form Field

➡ Choose your form plugin (Gravity Forms, WPForms, Ninja Forms).  

➡ Add a Hidden field and name it Sales Rep or Campaign Source.

Step 2: Turn On Dynamic Population

➡ In the form settings, turn on Dynamic Population.
➡ Set the parameter name as salesperson.

Step 3: Generate QR Codes with URLs

➡ Create one link per rep:
 https://yoursite.com/offer/?salesperson=Alex%20Smith
➡ Use any free QR code generator to turn these URLs into scannable QR codes.

Step 4 (Optional): Hide or Lock the Field

➡ If you don’t want users to change the value, use a Hidden Field or set it to read-only.

Pro Tip: You can even use this dynamic value in confirmation emails or thank-you pages, like:
 “Thanks! Your request has been sent to Alex Smith.”

Why This Works

  • Works across campaigns, QR codes, emails, social links.
  • Makes lead collection easier, faster, cleaner.
  • No need for custom dev or expensive plugins.

Final Outcome

  • Sales rep names filled in automatically.
  • No missed leads or manual errors.
  • Marketing attribution made easy and fully trackable.

Want Help Setting This Up? Let’s optimize your forms

Let’s Fix It

Other Resources Post

Block Spam: Secure WordPress Forms Smarter

This guide walks you through real-world anti-spam tactics you can use right now especially helpful if you’re using Gravity Forms, WPForms, Ninja Forms, or Contact Form 7.

How to Prevent Duplicate Submissions in Contact

Learn how to use JavaScript events to stop multiple form entries caused by repeated clicks—keep your email inbox and database clean, efficient, and free from unnecessary clutter.

Add ZIP Code Restrictions in Gravity Forms

Want to restrict form submissions to a specific area? Here's how we helped a client block submissions from ZIP codes outside their service zone using a custom validation method in Gravity Forms.

View All Resources Post

Powered by Creativity,
Fueled by Caffeine.

Get Started