How link & pass variable parameters to CCv5 from an article

Pass variable parameters from a Joomla article to ChronoConnectivity v5.

Overview

The issue occurs when the editor converts the ampersand in the URL parameter to its HTML entity, preventing the parameter from being recognized.
Disable the editor or use source code mode when inserting the CF plugin code in the article to preserve the ampersand. Then, retrieve the parameter value in the CF conditions using the provided method.

Answered
teldrive teldrive 03 Apr, 2014
I apreciate if someone can help, How can make this process more flexible? passing variable parameters to CC from an article

I can have different articles and CC's matched
ARTICLE1=> {chronoconnectivity5}edit_exams_form1{/chronoconnectivity5}
CC 1=>
<?php
return array("examen" => "6");
?>
ARTICLE2=> {chronoconnectivity5}edit_exams_form2{/chronoconnectivity5}
CC 2=>
<?php
return array("examen" => "7");
?>
Max_admin Max_admin 04 Apr, 2014
Hi Teldrive,

Please try this:
 {chronoconnectivity5}edit_exams_form1&examen=6{/chronoconnectivity5}


You should be able to pass any parameters this way.

Regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
teldrive teldrive 04 Apr, 2014
Hi Max, thanks by reply
but i have issue also in the other side CC
ARTICLE2=> {chronoconnectivity5}edit_exams_form2&nivelx=6{/chronoconnectivity5}
in html

i have been testing without sucess
<?php
return array ('examen'=> 'nivelx');
 ?>

<?php
$uri =& JFactory::getURI();
$var=$uri->getVar('nivelx');
return array ('examen'=> $var);
 ?>

<?php
$var = $_POST['nivelx'];
return array ('examen'=> $var);
 ?>

could you help me to complete this puzzle?
Max_admin Max_admin 04 Apr, 2014
What are you trying to do exactly ? my code will simply pass "examen" with the value = 6 to the connection, you may for example use it in the conditions box or some where else.
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
teldrive teldrive 05 Apr, 2014
Hi Max, so far the issue is how to get the 'nivelx' parameter value into CCv5 enviroment to be used in condition, I am lost

I changed name of parameter in order don't get confussion with names
'nivelx' is parameter passed by article
'examen' is field name of database

if I set in article:
ARTICLE2=> {chronoconnectivity5}edit_exams_form2&nivelx=6{/chronoconnectivity5}
in html

and in conditions (this doesn't work)
<?php
return array ('examen'=> "nivelx"); //also tried with 'nivelx'
?>

.....also tried
<?php
$var=$form->data['nivelx'];
return array ('examen'=> $var);
?>
Max_admin Max_admin 05 Apr, 2014
No, try this:

<?php
return array ('examen'=> $_GET["nivelx"]);
?>
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
teldrive teldrive 05 Apr, 2014
I tried Max, but is not working yet

<?php
 return array ('examen'=> $_GET["nivelx"]);   //also tried  $_GET['nivelx']); 
 ?>


I tested (in list display -> header code) to check what value it takes but it gives me php error code
 <?php
$var = $_GET['nivelx']);
echo "test  =>".$var."<br>";
?>


CC debug shows
  [2] => SELECT COUNT(*) AS `exa.count` FROM `pn6x7_examen_form` AS `exa` WHERE `exa`.`examen` = ''
Max_admin Max_admin 05 Apr, 2014
Ok, please try this instead:

 return array ('examen'=> \GCore\Libs\Request::data("nivelx"));
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
teldrive teldrive 05 Apr, 2014
Max, still fails
just to double-check i have in article

{chronoconnectivity5}list_exams_form&nivelx=6{/chronoconnectivity5}


also tried with
{chronoconnectivity5}list_exams_form&{nivelx=6}{/chronoconnectivity5}



and in CCv5 condition
<?php
 return array ('examen'=> \GCore\Libs\Request::data('nivelx'));  // also tried with "nivelx"
 ?>


no data seems to be passed to cc
Max_admin Max_admin 05 Apr, 2014
Please test using this code in the "header" box:

<?php
pr($_POST);pr($_GET);
?>


What do you get ?
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
teldrive teldrive 06 Apr, 2014
Hi Max, same results,
I send you debug screen, results obtained in list are equivalent to return ("examen"=>"0") so no params are passed
[attachment=0]Captura.JPG[/attachment]
Max_admin Max_admin 07 Apr, 2014
The $_GET var is totally empty, that's weird!

Do you have SEF enabled ? if yes then could you please test with it disabled ?
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
teldrive teldrive 07 Apr, 2014
Hi Max, i disabled SEF, but all links of web page get broken, anyway i tested it and I've got some return from $_Get query, but nothing related to param " &nivelx=3"
[attachment=0]Captura.JPG[/attachment]
Max_admin Max_admin 08 Apr, 2014
Ok, I have just made this test:

#1- connection name is "content", so I inserted in my article:
{chronoconnectivity5}content&test=1{/chronoconnectivity5}

#2- I inserted this code in the conditions (and also the header) box:
pr(\GCore\Libs\Request::data("test"));


that returned the correct value which is 1, so you should be able to use
\GCore\Libs\Request::data("test")


You can also use this line to get all the request values:
\GCore\Libs\Request::raw()


Regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
teldrive teldrive 08 Apr, 2014
Answer
:D Thanks a lot Max, in special by your patiente with me, we have got it
let me show you final results
Working condition code
<?php
 return array ('examen'=> \GCore\Libs\Request::data("amp;nivelx"));
 ?>


front-list-table-header code
<?php
 pr($_POST);pr($_GET);
pr(\GCore\Libs\Request::data("amp;nivelx"));
pr(\GCore\Libs\Request::raw());
 ?>


and results capture
[attachment=0]Captura1.JPG[/attachment]

my big question, why &-->amp; is not recognized as separator?????😲
Max_admin Max_admin 08 Apr, 2014
Please disable the editor when you enter the plugin code in your article, that's why the amp; is added, which should NOT be there of course, that's a problem!
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
teldrive teldrive 08 Apr, 2014
You are right
<td style="background-color: #dddada;">{chronoconnectivity5}list_exams2_form&nivelx=3{/chronoconnectivity5}</td>

i will have in mind
thanks again
teldrive teldrive 08 Apr, 2014
By the way, I have found a simple workaroung for this saving article in source code mode
This topic is locked and no more replies can be posted.