Hello Genius,
I am using Chronoforms5 and I want to show a barcode from input field in thank you message. What should I do?
In addition to that, I am using Joomla 3.6.5 and I want to add a field in user details so that I can directly create a barcode without taking details in form everytime. In this case, input data is roll number of student. I want to generate barcode of their roll number on thank you message.
Thank You in advance, Special thanks to GreyHead in Advance.
Thank you so Much for your quick reply, Thats what I expected from you. I will try it just now. As I am unable to send PM to you now, I will post my reply here.
Thank you.
Hello GreyHead,
When I tried your solution, I found some following things-
1. It generating barcode on form (in attachment) , I want its code so that I can Show it anywhere like in Email or Thank you message or in PDF.
2. I dont want to generate random id, I just want barcode from input alphanumeric field.
Please do something...
Hi abhishekpatil ,
You don't need to use the part of the code that creates the random string. Just use the input value from the $form->data array.
Once you have saved the image then you can include that as an image link in an email (remember to use the full URL) or in the thank you message or PDF.
Bob
Can't I use it without saving on server?
Is it possible to directly generate in PDF or Thank you message?
Hi abhishekpatil ,
Possibly but I wouldn't try. You could use a cron job to delete any files after say 24 hours if storage is the problem.
Bob
If its simple for you to take inputt value from form and generate barcode then will you provide its code please?
Thank you for your continuous guidance.
Thank you for the code, I have some doubts,
1) $form->data array is not working in thank you page, something went wrong. I have attached the screenshot.
2)To echo it out in thank you page, which addition should I do in Form code? If its possible, will you provide that?
It should not random code. It should input alphanumeric field from which barcode should be generated in Destination i.e. in Thank you page or Email.
3)How can I save it on server so that I will able to give a link through HTML in Thank you page?
Hi abhishekpatil,
Sorry, the Thank You page action does not support PHP (I forget that); use a custom Code action instead.
Replace input_name in my example with the name of the input with the value you want to add to the barcode.
Bob
Thank you,
Also,
How can I save it on server so that I will able to give a link through HTML in Thank you page?
From your reply,
I got an idea that,
I can show last message as a custom code instead of 'Show message'.
I got success to show barcode from input.
But there is another problem. I need a print button which will print data.
I have added to it. But when I click on it, barcode dissapears from print. What should I do?
According to me,
this barcode is not in Image format, it is in form of php code, thats why it diappears on print action. What should I do?
what will happen if I saved barcode on server and placed its link? Will print function print it?
How can I do that?
How can I save barcode on server? And how to get its link? will you provide its code?
Hi abhishekpatil,
Please check my last post.
Bob
Surely your solution works very well, But how to echo it out in custom code? Provided code is just saving img file. How to show it?
Hi abhishekpatil,
You can echo it out directly with the first code I added, or save it then show it using an <img> tag like any other image file.
Bob