bonghetti
Member
I used the Php List plugin to mark the selected rows as soldered. It works correctly (I create a payment id, update the date and indicate in a field that it is paid). Now at the same time I have to generate a PDF of the receipt, and I came up with an idea that partially worked. I added the javascript code provided by the plugin to open a detail of a list view with that payment and it automatically downloads the PDF (there is a layout problem because it is as if the PDF was generated without the Ajax view... sorry for my explanation). But in the meantime I have another problem: I can't pass the contents of the variable that created the payment id between the php code and the javascript code). here is the js code:
var $paymentId = details_56.formElements.get('a_iscrizioni_incontro_repeat___Pagamento').getValue();
var baseUrl = "/site/index.php";
var queryParams = "option=com_fabrik&task=details.view&formid=56&listid=56&rowid=" + paymentId + "&format=pdf";
var urlToOpen = baseUrl + "?" + queryParams;
window.open(urlToOpen, '_blank');
var $paymentId = details_56.formElements.get('a_iscrizioni_incontro_repeat___Pagamento').getValue();
var baseUrl = "/site/index.php";
var queryParams = "option=com_fabrik&task=details.view&formid=56&listid=56&rowid=" + paymentId + "&format=pdf";
var urlToOpen = baseUrl + "?" + queryParams;
window.open(urlToOpen, '_blank');