Hi I have a doubt, There is the possibility of using the phpqrcode library to insert a code qr in my form?
I have used this on Chronoforms v5 but not in Chronoforms v6 the code is not generated
-This is the code that I use (before I download the phpqrcode library from web and insert the file phpqrcode.php in the folder)
<?php
// get the QR Code library
include (JPATH_SITE.'/components/com_chronoforms6/extras/phpqrcode/phpqrcode.php');
// this line sets the content of the qr code
$text = $form->data['folio'];
$folder = JPATH_SITE.'/components/com_chronoforms6/uploads/qrcodes/';
$url = JURI::root().'components/com_chronoforms6/uploads/qrcodes/';
// create the file name
$file_name = 'qr_'.date('Ymd-his').'.png';
// create the QR code
QRcode::png($text, $folder.$file_name);
// save the name to the $form->data array
$form->data['qr_code'] = $file_name;
// add the file info to the $form->files array
$form->files['qr_code'] = array(
'name' => $file_name,
'link' => $url.$file_name,
'path' => $folder.$file_name,
'size' => filesize($folder.$file_name)
);
// display the code
echo "<div><img src='{$url}{$file_name}' /></div>";
?>
I have used this on Chronoforms v5 but not in Chronoforms v6 the code is not generated
-This is the code that I use (before I download the phpqrcode library from web and insert the file phpqrcode.php in the folder)
<?php
// get the QR Code library
include (JPATH_SITE.'/components/com_chronoforms6/extras/phpqrcode/phpqrcode.php');
// this line sets the content of the qr code
$text = $form->data['folio'];
$folder = JPATH_SITE.'/components/com_chronoforms6/uploads/qrcodes/';
$url = JURI::root().'components/com_chronoforms6/uploads/qrcodes/';
// create the file name
$file_name = 'qr_'.date('Ymd-his').'.png';
// create the QR code
QRcode::png($text, $folder.$file_name);
// save the name to the $form->data array
$form->data['qr_code'] = $file_name;
// add the file info to the $form->files array
$form->files['qr_code'] = array(
'name' => $file_name,
'link' => $url.$file_name,
'path' => $folder.$file_name,
'size' => filesize($folder.$file_name)
);
// display the code
echo "<div><img src='{$url}{$file_name}' /></div>";
?>