Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Generate bar code after form submission

Posted on 2012-03-30
6
Medium Priority
?
460 Views
Last Modified: 2012-03-31
Hello.

I'm hosting a big event soon and I'll have participants register using an online form. For my forms I'm using a third party software that handles everything.  

What I'm wanting to do is to generate a "unique code" for each of the people that sign up. I mean, once a user submits a form they would get a Bar code or something similar that they can print, they would then present that code to us the day of the event; this code would allow us to easily identify the person since we would scan it. We have both a bar code scanner and a QR code scanner.

Is there a script or something similar that can accomplish this?  

I hope this makes sense. Thanks for your comments.
0
Comment
Question by:Jacko_Pinto
  • 3
  • 2
6 Comments
 
LVL 56

Expert Comment

by:Joe Winograd, EE MVE 2015&2016
ID: 37789047
Easiest thing to do is simply use a bar code font. Generate a unique number for each form (from 1 to N, or whatever range you want to use) and then enter that number with the bar code font. Here are two free ones that I've used...both work well:

http://www.barcodesinc.com/free-barcode-font/
http://www.dafont.com/barcode-font.font

Regards, Joe
0
 

Author Comment

by:Jacko_Pinto
ID: 37789661
Thanks Joe,

I guess now I'm stuck as in how to automatically generate a number for each participant. I guess I could use the ID but then I wouldn't know how to turn that number into a bar code using the font. (Total newbie here)

Thanks for commenting!
0
 
LVL 56

Accepted Solution

by:
Joe Winograd, EE MVE 2015&2016 earned 1200 total points
ID: 37789719
You say that you're using third-party software for the forms that handles everything. I'm sure the third-party will have the skills to generate a unique number for each form...could be as simple as 1 to N. This is a very common thing to do...I'd be stunned if they couldn't do it. I'd also be stunned if they couldn't place each number in a standard bar code font, such as a very popular one called "3 of 9". For example, the form could look something like this:
12345-barcode-3of9The bar code above is actually the number 12345 in the "3 of 9" font (for participant 12345...could be 00001 or 99999 or whatever). If your third-party can't do this, you need a new third-party. :)   Regards, Joe
0
Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

 
LVL 7

Assisted Solution

by:designatedinitializer
designatedinitializer earned 800 total points
ID: 37789741
You can use this to generate a QR code:

<?
generateQRwithGoogle($user_email);

function generateQRwithGoogle($input,$widthHeight ='150',$EC_level='L',$margin='0') {
    echo '<img src="http://chart.apis.google.com/chart?chs='.$widthHeight.
'x'.$widthHeight.'&cht=qr&chld='.$EC_level.'|'.$margin.
'&chl='.$input.'" alt="QR code" widthHeight="'.$widthHeight.
'" widthHeight="'.$widthHeight.'"/>';
}
?>

I would use the user email because that will surely be unique and identifies the user.
You can use whatever you want.
0
 
LVL 56

Expert Comment

by:Joe Winograd, EE MVE 2015&2016
ID: 37789804
A potential problem with using the email address is that not everyone may be willing to divulge it, being concerned about getting buried with marketing emails (aka spam). Also, depending on the demographics of your participants, not everyone may have an email address.
0
 
LVL 7

Expert Comment

by:designatedinitializer
ID: 37789838
joe:
...that's irrelevant.
I think it's pretty obvious Jacko_pinto will not use email addresses if his form doesn't require one (!) and thus will go with a serial form number as already suggested...
However, if his form requires an email address that problem is already solved in a much cleaner way.
0

Featured Post

Learn Veeam advantages over legacy backup

Every day, more and more legacy backup customers switch to Veeam. Technologies designed for the client-server era cannot restore any IT service running in the hybrid cloud within seconds. Learn top Veeam advantages over legacy backup and get Veeam for the price of your renewal

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This post looks at MongoDB and MySQL, and covers high-level MongoDB strengths, weaknesses, features, and uses from the perspective of an SQL user.
In this blog post, we’ll look at how ClickHouse performs in a general analytical workload using the star schema benchmark test.
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses

877 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question