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");
?>
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...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
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...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
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);
?>
No, try this:
<?php
return array ('examen'=> $_GET["nivelx"]);
?>
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
Ok, please try this instead:
return array ('examen'=> \GCore\Libs\Request::data("nivelx"));
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
Please test using this code in the "header" box:
<?php
pr($_POST);pr($_GET);
?>
What do you get ?
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
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]
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...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
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]
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...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
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...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
By the way, I have found a simple workaroung for this saving article in source code mode